Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: write/read to remote machine

by roboticus (Chancellor)
on Jul 27, 2010 at 21:54 UTC ( #851618=note: print w/replies, xml ) Need Help??

in reply to write/read to remote machine


Hmmm ... interpolation and backslashes are giving you a different directory than you're wanting. Use forward slashes instead of backslashes, use single quotes, or double your backslashes. Also, $\ is a special variable, so using single quotes would prevent that from interpolating.


Replies are listed 'Best First'.
Re^2: write/read to remote machine
by hari9 (Sexton) on Jul 28, 2010 at 19:44 UTC

    I tried putting the path in single quotes and it worked as I expected in windows machine.(removed the ip address of the local machine in that case.), still didnt work.

    Thanks for your reply

      Did you double-up on the backslashes? The single quotes prevents $\ from interpolating, but '\\' still converts to '\':

      Roboticus@Roboticus-PC ~ $ cat #!/usr/bin/perl print '\\\C$\Users\hari9', "\n"; print '\\\\\\C$\\Users\\hari9', "\n"; Roboticus@Roboticus-PC ~ $ perl \\C$\Users\hari9 \\\C$\Users\hari9


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2022-08-16 19:29 GMT
Find Nodes?
    Voting Booth?

    No recent polls found