open(F,$ARGV[0]) or die $!; while ( ) { # remove \n chomp; # process the current line. } close(F);