http://qs321.pair.com?node_id=690696

wfsp has asked for the wisdom of the Perl Monks concerning the following question:

I recently rebuilt Vista following a hard disk failure and I can no longer upload files without them being corrupted (lines truncated). It was fine before. My FileZilla FTP client works fine. But with Net::FTP there is some weirdness going on.
#!/usr/local/bin/perl use strict; use warnings; use Config::Simple; use Net::FTP; my $success; my %cnf; Config::Simple->import_from(q{cnf/sw.cnf}, \%cnf); my $ftp = Net::FTP->new($cnf{host}, Passive => 1) or die qq{cant connect: $!\n}; print $ftp->message; $success = $ftp->login($cnf{login}, $cnf{pwd}); print $ftp->message; $ftp->ascii; #$ftp->binary; print $ftp->message; my $local = q{c:/www/032/docroot/test.html}; my $remote = q{032/docroot/test.html}; $success = $ftp->put($local, $remote); print $ftp->message;
output
FTP Server ready. User u41576016 logged in Type set to A Opening ASCII mode data connection for 032/docroot/test.html Transfer complete
result
<html <head <title>ftp test</title <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1 +" </head <body <h1>ftp test</h1 </body </html>
With $ftp->ascii commented out and $ftp->binary uncommented I get
<html> <head> <title>ftp test</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1 +"> </head> <body> <h1>ftp test</h1> </body> </html>
Changing passive to 0 doesn't affect the outcome.

Now, I admit this more than likely a combination of my ineptitude and Vista. A lethal combination! :-)

Can anyone shed any light on it?