in reply to Re: Perl Program works on local machine, not over network?
in thread Perl Program works on local machine, not over network?
Even better with the open is to use the three parameter variant and lexical file handles:
open my $inFile, '<', $sloc or die "Can't open $loc: $!\n";
which makes the open mode explicit (and avoids a potential injection attack), and gives all the strictly goodness advantages from using the lexical file handle.
Oh, and don't interpolate a single variable ("$loc") - there is no need and clutters the code.
|
|---|