Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

mndoci's scratchpad

by mndoci (Scribe)
on Jun 04, 2004 at 22:04 UTC ( [id://361230]=scratchpad: print w/replies, xml ) Need Help??

s/^\s+//; # removing leading whitespace

FTP without Net::FTP
#!/usr/bin/perl print "Content-type:text/html\n\n"; use File::Copy; $remotehost1 ="a"; $remotepath ="/b"; $remoteuser ="c"; $remotepass ="d"; @fileftp = qw(x.wml y.wml z.wml); $cmd="ftp -n"; foreach $wmlfile (@fileftp) { if(-f $wmlfile) { $ftp_commands = " open $remotehost1 user $remoteuser $remotepass cd $remotepath asc put $wmlfile bye "; open (CMD, "|$cmd"); print CMD $ftp_commands; close (CMD); print "File $wmlfile has been transferred \n"; print "<br>\n"; $finish = 'transfer'; copy ("$wmlfile","./$finish/$wmlfile"); } }

copy, move, rename
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 12:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found