Hi,
Is there a way, in perl, to pass a file handle to multiple subroutines while still using the same file handle in the 'main' section of the program.
this does not appear to be working.
Is there a way, in perl, to pass a file handle to multiple subroutines while still using the same file handle in the 'main' section of the program.
this does not appear to be working.
Code:
open(FH,"<a_file") or die $!;
while(my $line =<FH>){
.
.
<some processing>
}
&sub_routine_A(*FH);
&sub_routine_B(*FH);