in reply to Re^2: Need Net::FTP rmdir time out help
in thread Need Net::FTP rmdir time out help

Quoting Mr.Muskrat:
You aren't checking if rmdir succeeded or failed.
So, instead of
$ftp->rmdir ( "${Ordered_List[$Index]}", 1 );
you should do something like
if ($ftp->rmdir ( "${Ordered_List[$Index]}", 1 )) { say "rmdir succeeded"; } else { say "rmdir failed"; }
Aside from permission problems, a recursive rmdir could fail if e.g. deleting the contents takes too long.

Replies are listed 'Best First'.
Re^4: Need Net::FTP rmdir time out help
by Anonymous Monk on Feb 02, 2017 at 18:38 UTC
    I like the if sequence. Thank you! I had been using the returned message, but there was nothing helpful in it.

    I will have some time on Friday to work on this again, I will get back

    Additional info: I have noticed that once a recursive rmdir has failed, Net::FTP can never deleted the director, no matter how many times I try. (bash works)
Re^4: Need Net::FTP rmdir time out help
by Todd Chester (Scribe) on Feb 04, 2017 at 08:13 UTC
    I used the "if". Conclusion: "rmdir recurse" is intermittent. Rats. The code just got a lot more complicated