in reply to Bad file number

Have you tried downloading the file with a standard FTP client? Does that work? Make sure the FTP client is in active mode, as that's the default with Net::FTP as well. If it fails interactively with active mode, but succeeds with passive mode, you need to give the Passive option to the Net::FTP constructor.

See also the Net::FTP manual page.

Abigail

Replies are listed 'Best First'.
Re^2: Bad file number
by Anonymous Monk on Jan 08, 2006 at 19:42 UTC
    I encountered the same error. My script brought a list of files from a unix server through the firewall then PUT the file(s) on an NT server. It failed on the PUT during the inbound session. Process of elimination found the problem to be permissions set on the NT server when I was not allowed to delete existing data files. It would'nt allow duplicate data file names to be written either. For testing I had the script put the file with an added extension and it worked.