Net::FTP inherits from Net::Cmd. As with any module that inherits from other modules, it's a good idea to check the documentation for all base class modules (the modules listed in the @ISA array, if there is one) when you're learning how to use a particular module. Perl uses the modules listed in @ISA to find methods that are invoked against an object of a particular class when those methods aren't found in the object's class.

Looking at line 26 of Net::FTP (v. 2.62), we see that Net::FTP inherits methods from Exporter, Net::Cmd, and IO::Socket::INET. There's probably not much of interest in the Exporter documentation, but Net::Cmd's documentation lists a method called message that:

Returns the text message returned from the last command

You should be able retrieve the server response for all of the commands you're sending to the server with methods invoked against your $ftp object like so:

open LOG, ">> $LOGFile" or die "IO error opening $LOGFile for append: +$!"; ... $ftp->get($filename); print LOG "[get $filename] server response: ", $ftp->response || 'no r +esponse', "\n";

I hope that helps.


In reply to Re: Problem while FTP by converter
in thread Problem while FTP by ganeshm69

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.