MoFizzle has asked for the wisdom of the Perl Monks concerning the following question:
sub transfer { my $ftp = Net::FTP->new("$ftp_server", Debug=> 0, Hash=> 1) or die "ERROR $!\n"; $ftp->login( "$login", "$password"); foreach my $file ( @source_files ) { my @fields = split( '/', $file ); my $dest_file = pop( @fields ); print "Transfer: $file - $dest_file\n"; $text->insert('end', "Transfer: $file - $dest_file\n"); $text->see('end'); if ( $ftp->put( "$file", "$dest_dir/$dest_file" ) ) { $text->insert('end', " FILE TRANSFERRED\n"); } else { $text->insert('end', " ERROR: $!\n"); $text->insert('end', " SOURCE: $file\n"); $text->insert('end', " DEST: $dest_dir/$dest_file\n"); } } $ftp->quit(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Update Text Widget during FTP in Perl/Tk
by zentara (Cardinal) on Oct 14, 2004 at 12:58 UTC | |
|
Re: Update Text Widget during FTP in Perl/Tk
by saintmike (Vicar) on Oct 14, 2004 at 00:17 UTC | |
|
Re: Update Text Widget during FTP in Perl/Tk
by TedPride (Priest) on Oct 14, 2004 at 10:54 UTC |