in reply to Re^2: IPC::Run and scp's password entry
in thread IPC::Run and scp's password entry

It's not passing anything, because at the point your code first checks the output it does not yet contain the pattern you are searching.

It also could be that you never get any output from the command resembling what you think it should. Most of the examples for IPC::Run you must remember are using the Unix utility 'cat', which outputs its own input. I doubt whatever scp utility you are using sends the input at the password prompt back to you as output. Others issue a command to a program with a command-then-prompt interface, and they wait for the prompt before issuing another command. You're actually wanting the password prompt before you send the first input and for the next thing to be something telling you about the status of the transfer.

I'm not sure why you're using this module for scp in the first place, unless you have a reason you can't use Net::SCP, Net::uFTP, or Net::SCP::Expect.

  • Comment on Re^3: IPC::Run and scp's password entry

Replies are listed 'Best First'.
Re^4: IPC::Run and scp's password entry
by isync (Hermit) on Dec 19, 2008 at 22:00 UTC
    I am currently having a look into Net::SCP::Expect - I could kick myself for not having the idea to look around cpan for scp wrappers... Thanks!