Also, if you're using SCP, you might want to consider creating a "script user" on the remote system and enabling hostkey authentication between the two boxes. This will eliminate the need for you to "expect" anything and save passwords for accounts in your perl script. I was really intrigued by
this module as far as SSH is concerned. Unlike Net::SSH,
Net::SSH::Perl doesn't use IPC::Open3 or Expect. I haven't read too much into, so I'm not sure if it supports SCP yet, but DEFINATELY worth keeping an eye on.
-brad..