Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: NET::FTP Package

by Zitoune (Beadle)
on Nov 21, 2002 at 15:43 UTC ( [id://214791]=note: print w/replies, xml ) Need Help??


in reply to NET::FTP Package

Here's the code

use Net::FTP; $G_FTP_SITE = &Config_Get("TOTAL_CARE FTP_SITE"); $G_FTP_USERNAME = &Config_Get("TOTAL_CARE FTP_USERNAME"); $G_FTP_PASSWORD = &Config_Get("TOTAL_CARE FTP_PASSWORD"); $ftp = Net::FTP->new( "$G_FTP_SITE" ); $ftp->login( "$G_FTP_USERNAME","$G_FTP_PASSWORD" ); $ftp->binary (); $ftp->put( "file.txt" ); $ftp->quit;

Replies are listed 'Best First'.
Re: Re: NET::FTP Package
by insensate (Hermit) on Nov 21, 2002 at 15:51 UTC
    Use strict.
    And trap for errors:
    use strict; my $ftp = Net::FTP->new( "$G_FTP_SITE" ) or die "Can't connect: $!"; $ftp->login( "$G_FTP_USERNAME","$G_FTP_PASSWORD" ) or die "Can't login +: $!; $ftp->binary () or die "Can't set mode to bin: $!";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://214791]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-19 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found