I have perl script as follow.
------------------------------------------------------------------------
#! /usr/bin/env perl
use strict;
sub printLines
{
print "Inside the function.............\n";
my (@file , $count , $key ) = $_;
print $count , $ key ; # It does not print this. ?
}
open(READ_FILE ,"simple.txt");
my @fa = <READ_FILE>;
my $symbolkey = "MY_SYMBOL";
my $line;
foreach $line (@fa){
if ($line =~ /$symbolkey/) {
print $line ,"Match found .............\n";
&printLines(@fa,3,$symbolkey);
}
}
close(READ_FILE);
-------------------------------------------------------------------
Function gets called. But inside function , it does not print values of arguments. What is problem with it.
Thank you,