in reply to Correct pathway to a file
No, they don't need to be in the same directory. Just use the full path to the file when opening it...
open my $fh, '<', '/home/tai/Documents/foo.txt'; while (my $line = <$fh>) { print "Got line: $line"; } close $fh;
|
|---|