So &fail does not run. This is &fail
if ($msg !~ /Virtual user test logged in/ && not -e "$location/$ht.ftpflag") {
open MAIL,"|/usr/bin/mailx -s $sub $TO";
print MAIL $down_msg;
close MAIL;
`echo "Unable to ftp into $ht at $mon/$mday $hour:$min" >> $log`;
`echo "$ht" > $location/$ht.ftpflag`;
exit;
}
}
Main Topics
Browse All Topics





by: Adam314Posted on 2009-04-28 at 07:46:38ID: 24251344
If the Net::FTP module can't connect, it'll return undef. So on line 1, it tries to connect. If it can't, it calls your fail subroutine. Does this subroutine exit, or does it return? If it returns, your program will then try to login on line 2/49. This will give you the error you are seeing.