$filename = $ARGV[0]; open (FILE,"$filename") || die "Can't Open $filename: $!\n"; while{ #dealing with it per-lines #process something here }