I have not used Net::FTP in years, i remember nothing about it's API ... but sincei was bored i skimed your post, saw that the error was coming from the "get" method and read the perldocs. it appears you are calling it incorrectly -- it can take 3 args, and the third arg is refered to in the docs as "WHERE" but it is not a directory name...

If WHERE is given then the first WHERE bytes of the file will not be transferred, and the remaining bytes will be appended to the local file if it already exists.

...The error message being returned seems to be the FTP server complaining that it can't understand the "REST" command since it specifies a string instead of an int for the number of bytes to skip (a quick google search indicates that i am probably correct, "REST" is hte low level FTP command indicating that the next command only wants the "rest" of the file after so many bytes.


In reply to Re: Net::FTP can't fetch file to local directory? by hossman
in thread Net::FTP can't fetch file to local directory? by xiaoyafeng

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.