Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Answer: How to FTP from STDOUT?

by I0 (Priest)
on Dec 24, 2000 at 07:31 UTC ( #48186=categorized answer: print w/replies, xml ) Need Help??

Q&A > network programming > How to FTP from STDOUT? - Answer 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 $!;

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
What's the matter? Cat got your tongue?...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2017-07-28 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (424 votes). Check out past polls.