Quote:
|
Originally Posted by avadhani
my (@file , $count , $key ) = $_;
|
Use '@_' instead of '$_'. And you simply should not pass an array directly if the subroutine signature contains a mixture of scalar and list data values, because the @file in your example will gobble up all parameters leaving $count and $key undef, even if you have made the change I mentioned above.
Pass by reference.
Code:
my ($r_file , $count , $key ) = @_;
my @file = @$r_file;
And change the way you call the subroutine:
Code:
&printLines(\@fa,3,$symbolkey);