pattar_g:

As Joost said, FTP can fail often. You may get timeouts on the link or the file on the other end may be locked preventing reads, which is the cause of many FTP failures at my site. I've even had problems with the file being in the wrong mode (ASCII/BINARY/EBCDIC), so now my scripts tend to explicitly choose which one is required for each file.

Just yesterday, I posted a reply with some code regarding Net::FTP use. Perhaps it will be of some use to you. Though you'll probably want to review the whole thread as there were plenty of other helpful answers too.

--roboticus


In reply to Re: Net::FTP corrupting files or timing problem by roboticus
in thread Net::FTP corrupting files or timing problem by pattar_g

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.