in reply to Re: Re: Bad file descriptor' error with automated FTP script.
in thread Bad file descriptor' error with automated FTP script.

I don't see you using the date/time there. (Surely that -f gets a filename?). In any case, you could check if the parsing of the dir() output is producing rubbish.

If you need the last modification time of the file, there is also a mdtm(Filename) command which will give you that.

Also, adding a Debug => 1 to your new() call may give some helpful clues. C.