Rhea Yakob wrote:
I was trying to put some files to a remote machine (unix) from
the local (win) machine using a perl script in ascii mode.
$ftp->ascii();
$ftp->put($file1,$file11) or die "put failed \n";
Suppose you used Net::FTP. You should have told us that.
Later on when I try to get back the same file with a new name
to my local machine
$ftp->get($file11,$file22) or die "get failed \n";
and do a check on the contents using the compare()
compare("$file1","$file22) == 0)
I'm not getting the same file back?
Net::FTP uses ascii mode by default, which means that the line endings
were converted also when you transferred the file back to your local
machine. Consequently, those files should not be identical.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/