in reply to Bad File descriptor Error

You have

$ftp->get("$_") or die "Cannot get $_: $! $^E\n";

But $! and $^E aren't set by Net::FTP. The module's synopsis has a clear example of how to get the error message:

$ftp->get("that.file") or die "get failed ", $ftp->message;

Note that this'll expose that 550 error that the debug output shows, which means "file unavailable" according to a FTP RFC:

550 Requested action not taken. File unavailable (e.g., file not found, no access).

Replies are listed 'Best First'.
Re^2: Bad File descriptor Error
by amvarma (Initiate) on Jan 04, 2011 at 07:48 UTC
    Thanks a lot for quick reply.
    Whatever file I am trying to access is available in that location.
    Strangely I see a "\" is being getting added to filename by "get()". I am just passing file name as it is. Does the function get() misbehave?
    Net::FTP=GLOB(0x1eb0c44)>>> PORT 192,168,2,31,14,171 Net::FTP=GLOB(0x1eb0c44)<<< 200 PORT command successful. Net::FTP=GLOB(0x1eb0c44)>>> RETR Access_Sequence_DotNet_Log.html Net::FTP=GLOB(0x1eb0c44)<<< 550 \Access_Sequence_DotNet_Log.html : can +'t find the file Cannot get Access_Sequence_DotNet_Log.html \Access_Sequence_DotNet_Log.html : can't find the file
    Thanks
    Amit
      I assume that the leading backslash indicates the full path the server thinks you're asking for. Note the RETR line shows the correct filename is sent.

      You might want to print $ftp->cwd(), "\n"; before you call ->get to make sure you're in the right directory on the server.

      Strangely I see a "\" is being getting added to filename by "get()"

      No, by the server. Note the direction of the arrows. "<<<" means from the server. You need to either specify an absolute path or set the cwd correctly.