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

I was about to suggest ls instead of dir, but it looks like mifflin beat me to it. So instead I'll point out that your '|| print .. ' statements are not ending the script, thus you will get errors in all the following code, if for example your $ftp = new Net::FTP .. fails. (And assuming you are using at least the 'warnings pragma, else it will just complain siliently.)

C.

Replies are listed 'Best First'.
Re: Re: Bad file descriptor' error with automated FTP script.
by Anonymous Monk on May 14, 2004 at 08:26 UTC
    For "||print .." changed to "or die ..." , this should be fine.