Perl and FTP - TechRepublic
General discussion
August 7, 2001 at 01:08 AM
gjohnson

Perl and FTP

by gjohnson . Updated 24 years, 10 months ago

I have written a script that has a subroutine that moves some files via FTP. The problem is that sometimes the FTP server is down. This causes the program to die. I am trying to add fault tolerance to the program, but haven’t been able to get thesubroutine to just return gracefully to the calling routine. I have tried an unless($ftp->login…){return 0} but it doesn’t seem to work. Any ideas on putting putting some error handling on the ftp call would be greatly appreciated

This discussion is locked

All Comments