cc has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use warnings; use Net::FTP; use Net::Netrc; my $server = "192.168.1.1"; my $user = "anonymous"; my $password = ""; my $destination = "/IN"; my $File = "/home/transferfile"; my $ftp = Net::FTP->new ($server, Timeout => 9000, Debug => 3); $ftp or die "$server: cannot connect: $@"; $ftp->login ($user,$password) or die "$_: Could not login: " . $ftp->m +essage; $ftp->cwd($destination); # Put file $ftp->ascii; $ftp->put($File) or die "$server: cannot put $File: " . $ftp->message; $ftp->quit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: convert files unix2dos using perl script
by Happy-the-monk (Canon) on Jun 20, 2004 at 22:44 UTC | |
by jfroebe (Parson) on Jun 21, 2004 at 03:20 UTC | |
|
Re: convert files unix2dos using perl script
by hbo (Monk) on Jun 21, 2004 at 06:53 UTC | |
by cc (Beadle) on Jun 21, 2004 at 09:26 UTC | |
by bart (Canon) on Jun 21, 2004 at 11:00 UTC | |
by cc (Beadle) on Jun 21, 2004 at 18:02 UTC |