in reply to FTP error
Looks like an error on the FTP server to me.
Your DOS login fails. Therefore it is reasonable to expect that a login from your perl script will also fail.
The 530 error message indicates that the server can't chroot you to the directory it beleives to be your home directory. Make sure it exists and you have sufficient access to it.
Only when you are able to log in from a DOS FTP will you have any hope of getting in from your perl script.