in reply to read file from ARGV
hope the below code will b helpful for you
#!/usr/bin/perl use strict; use warnings; my @a; open (FH,'<',$ARGV[0]); #or @ARGV[0] while(<FH>) { push(@a,$_); } print "@a";
In Section
Seekers of Perl Wisdom
in reply to read file from ARGV
hope the below code will b helpful for you
#!/usr/bin/perl use strict; use warnings; my @a; open (FH,'<',$ARGV[0]); #or @ARGV[0] while(<FH>) { push(@a,$_); } print "@a";