$ftp = new Net::FTP($host, Debug => $debug, Timeout => $timeout, Firewall => $firewall); unless ($ftp) { #not important } else { print("Connected to $host...\n"); if ( $ftp->login( $acct, $pwd ) { print("Logged in...\n"); } else { if ( ${*$ftp}{'net_cmd_code'} >= 300 ) { die("Bad account and/or password.\n"); } } }