If I try
$ftp->put(\*TR,$File);
220 ttn208 Microsoft FTP Service (Version 5.0).
Net::FTP=GLOB(0x834a938)>>> user anonymous
Net::FTP=GLOB(0x834a938)<<< 331 Password required for anonymous.
Net::FTP=GLOB(0x834a938)>>> PASS ....
Net::FTP=GLOB(0x834a938)<<< 230 User anonymous logged in.
Net::FTP=GLOB(0x834a938)>>> CWD /IN
Net::FTP=GLOB(0x834a938)<<< 250 CWD command successful.
unix2dos: converting file /home/transferfile to DOS format ...
Net::FTP=GLOB(0x834a938)>>> TYPE I
Net::FTP=GLOB(0x834a938)<<< 200 Type set to I.
Net::FTP=GLOB(0x834a938)>>> PORT X,X,X,X,128,156
Net::FTP=GLOB(0x834a938)<<< 200 PORT command successful.
Net::FTP=GLOB(0x834a938)>>> STOR /home/transferfile
Net::FTP=GLOB(0x834a938)<<< 550 /home/transferfile: The system cannot find the path specified.

open my($tr), "unix2dos $File |" or die $!; # Or FQ path $ftp->binary(); # We translate, not the server. $ftp->put($tr,$File); # must give remote name.
...............................................................................
550 /home/transferfile: The system cannot find the path specified.

open my($fh), $File or die $!; $ftp->binary(); # We translate, not the server. $ftp->put($fh,$File); # must give remote name.
...............................................................................
550 /home/transferfile: The system cannot find the path specified. -bash: 550: command not found

and I don't get any transfer, but the path to the file is correct.

In reply to Re^4: convert files unix2dos using perl script by cc
in thread convert files unix2dos using perl script by cc

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.