open my $fh, '<', '/home/tai/Documents/foo.txt'; while (my $line = <$fh>) { print "Got line: $line"; } close $fh;