in reply to Simple command line FTP

Why pure-perl? There are other tools available which are more suited for interactive command applications, like Expect. It most probably is already available in your environment.