When using your example of $ftp_user = 'DOMAIN\\user1'; I get the error: Could not login to 9.9.9.9 1000 with user DOMAIN\user1: at ./test.pl line 34. ##1000 is the port sed -n 34p test.pl showed me : $ftp->login($ftp_user, $ftp_password) #line 34