in reply to Re: Re: Re: net::ftp please
in thread net::ftp please

<http> <body> Yea.. here's the real script i'm running.. with my name
inserted instead.. also.. here's the module list from verio:
http://home.verio.com/support/hosting/perl_modules.cfm
Would the first line of the script still use double comma's?

Lisa.

use Net::FTP;
my $hostname='Lisa.com';
my $user='Lisa';
my $password='Lisa';
my $ftp=Net::FTP -> new($hostname) or die ("Connect failed");
$ftp->login($username,$password);
$ftp->binary;
$ftp->cwd("/pub/uploads");
$ftp->put("mystuff.txt");
$ftp->get("warezlist.txt");
$ftp->quit

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: net::ftp please
by davorg (Chancellor) on Apr 18, 2001 at 12:22 UTC

    In the call to $ftp->login you are using the variable $username, but you never set that variable to a value. You set the variable $user to a value, but you never use it anywhere.

    Using -w and use strict in your scripts would alert you to problems like this.

    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me