jdlev has asked for the wisdom of the Perl Monks concerning the following question:
Basically...if I put the file in the same folder as my .pl script, and run it...it works fine.
However, when I change the location to say something like this:
$loc = '\\Server\Shared Folder\Text.txt'; I can't get it to read it?
Here's my code...what am I doing wrong?:
print "ENTER ACCOUNT NUMBER: "; $acct = <>; print "\n>SEARCHING FOR DISPATCH INSTRUCTIONS ON ACCOUNT #: $acct Ple +ase Wait..."; $loc = "\\\\Server\\MappedNetworkDrive\\Folder\\$acct\\DispatchInstruc +tions.txt"; print $loc; #Get File Info open(MYFILE, "$loc") or print "Didn't Open $loc"; while (<MYFILE>) { sleep(5); chomp; print "$_\n"; } close (MYFILE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Program works on local machine, not over network?
by toolic (Bishop) on Jan 31, 2012 at 19:08 UTC | |
by jdlev (Scribe) on Jan 31, 2012 at 19:26 UTC | |
|
Re: Perl Program works on local machine, not over network?
by dasgar (Priest) on Jan 31, 2012 at 19:12 UTC | |
by GrandFather (Saint) on Jan 31, 2012 at 19:23 UTC |