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

Re^3: replace a line when regex match...

by revdiablo (Prior)
on Apr 12, 2005 at 05:25 UTC ( [id://446852]=note: print w/replies, xml ) Need Help??


in reply to Re^2: replace a line when regex match...
in thread replace a line when regex match...

does some one have a better idea of loging into a remote box and running an inline script on it?

Inlining like this can be a real pain. In your case, the interpolation phase is clobbering all your variables before you even pass the code to $ssh->cmd. You should probably be using single quotes. I think it would be a lot easier to avoid the inlining altogether, though, and just save the script to a file on the remote host.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-24 07:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found