in reply to
Take a look at the Expect module on CPAN. (in the CPAN module do an 'install Bundle::Expect'.)
At a Perl Mongers meeting some months back, I saw a demonstration of Expect used to automate remote logins, file transfers, etc.
From what I gather, Expect is a very powerful module. Check it out.
Update: A little more research shows that Perl Expect is a rewrite of the original, Tcl-based Expect. The name comes from the old uucp/kermit days of "send/expect." You can do all sorts of wild and wonderful things with this module--automate all sorts of remote tasks!