open(FH1, "test.txt") || die ("Failed to open!\n"); my $line; while ($line = ) { chomp($line); print "It was $line!!!\n"; }