Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Answer: How to FTP from STDOUT?

( #48186=categorized answer: print w/ replies, xml ) Need Help??

Q&A > network programming > How to FTP from STDOUT? contributed by I0

use Net::FTP; $ftp = Net::FTP->new($host) or die $!; $ftp->login($user,$password) or die $!; $sock = $ftp->_data_cmd('stor', "remotelogfile") or die $!; while( <DATA> ){ $sock->write($_,length) or die $!; } $sock->close() or die $!;

Comment on Answer: How to FTP from STDOUT?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2014-07-26 08:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls