|
|
| Just another Perl shrine | |
| PerlMonks |
Re: Using Perl to do SCPby Rhys (Pilgrim) |
| on Sep 15, 2004 at 16:03 UTC ( #391225=note: print w/ replies, xml ) | Need Help?? |
|
Okay, I did both of what I suggested to myself. :-) I wrote a new error_handler sub with use Data::Dumper, plus I wrote some extra code in there to clean up the data passed through @_. Here's what I used:
As it turns out, the problem is the way the switch closes the connection at the end of the file transfer. Apparently, Net::SCP::Expect doesn't expect (pardon the pun) the string it gets. So here's the code I'm using (successfully, so far) in the production script to handle it:
As far as I can tell, only one error line gets passed to the error handler. If this turns out not to be the case later, I'll have to change scp_errors to deal with multiple args. --J
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||