I am attempting to upload a text file to an FTP server using Net::FTP. The resulting text file on the server is an incomplete version of what I am uploading. Uploading an identical file, the file gets 'cut off' at the same place in the file each time.
my $ftp;
my $host = "192.168.125.42";
$ftp = Net::FTP->new($host)
or die "Cannot connect to host: $@";
$ftp->login("anonymous",'-anonymous@')
or die "Cannot login ", $ftp->message;
$ftp->ascii;
$ftp->put($filename_tran)
or die "put failed ", $ftp->message;
$ftp->put($filename_occ)
or die "put failed ", $ftp->message;
$ftp->quit;
The data I am uploading consists of lines that look like this:
RI Anaheim Garden Grove 06-27-2006 UNKNOWN GROSS HOTEL SALES
+ 100.80M
The last transfered line of this text file ends up looking like this:
RI Anaheim
even though the text file I am uploading has a complete line.
The error is very consistent. I am not sure why other options I have left to try with this module. I do not know how to error check with it. Uploading the file manually results in a successful upload.
Any ideas?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.