Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: FTP wtih Perl

by DigitalKitty (Parson)
on Nov 23, 2006 at 05:39 UTC ( #585671=note: print w/replies, xml ) Need Help??


in reply to FTP wtih Perl

Hi Anonymous Monk.

I agree with the other monks in that perl should be fully capable of receiving/transferring a 1.5G file. If an issue arises, it might be on the ISP side. The following code is untested and was modelled on the perldoc example.

#!/usr/bin/perl -w use strict; use Net::FTP; my $ftp; $ftp = Net::FTP->new("my_host", Timeout=>240, Debug => 0) or die "Error: $@"; $ftp->login('id','password') or die "Error: ", $ftp->message; $ftp->cwd("/folder") or die "Error with cwd command: ", $ftp->message; $ftp->put('filename to transfer', 'filename it will be called on the r +emote server') or die "Error in transfer: ", $ftp->message; $ftp->quit;


Additional information can be found at: http://perldoc.perl.org/Net/FTP.html.

Hope this helps,
~Katie

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://585671]
help
Chatterbox?
[Corion]: Mhmm. Our datawarehouse is named after the department, except that the department changed its name one year ago. Now I guess I'm looking for the moral equivalent of "THE Datawarehouse", where "THE" stands for "Traditional High-valued Expertise" ;)

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2017-07-26 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (386 votes). Check out past polls.