http://www.perlmonks.org?node_id=1016667


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";