http://www.perlmonks.org?node_id=666345


in reply to scp perl

This seems to have nothing to do with perl... but I'll bite.
system('scp login:password@host:path/to/file.txt file_backup.txt'); if (-f 'file_backup.txt') { system('ssh login:password@host rm path/to/file.txt'); }
More safeguards are necessary here, and I shudder to see a password in plaintext. Learn to use ssh's authorized_keys file at the minimum. Reading all of ssh's manpage until enlightenment comes is better.

--
[ e d @ h a l l e y . c c ]