Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Is there a trick to read file from \\server?

by grantm (Parson)
on Aug 20, 2011 at 07:15 UTC ( #921386=note: print w/ replies, xml ) Need Help??


in reply to Is there a trick to read file from \\server?

Have you tried:

#!/usr/bin/perl use File::Copy; my $original_file = '//serv123/logs/log1.txt'; my $new_file = "C:/Documents and Settings/user/desktop/newfile.log";

Many years ago when I had to use Windows I found Perl was happy to accept / as a directory separator. I'm not 100% sure it works with UNC paths but it certainly used to work with the likes of C:/Temp and was a lot easier than doubling up the backslashes everywhere.


Comment on Re: Is there a trick to read file from \\server?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://921386]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (15)
As of 2015-07-29 16:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (265 votes), past polls