Велемир
28.07.2008, 00:06
#!usr/bin/perl -w
use strict;
use NET::FTP;
use constant host => 'ftp://pump.starman.ee';
use constant directory => 'pub';
my $ft = NET::FTP->new(host) or die"Can`t connect : $@\n";
$ft->login('Anonymous');
$ft->cwd('pub');
C:\>gaga.pl
Can't locate object method "new" via package "NET::FTP" (perhaps you forgot to l
oad "NET::FTP"?) at C:\gaga.pl line 7.
Не пойму где ошибка.
use strict;
use NET::FTP;
use constant host => 'ftp://pump.starman.ee';
use constant directory => 'pub';
my $ft = NET::FTP->new(host) or die"Can`t connect : $@\n";
$ft->login('Anonymous');
$ft->cwd('pub');
C:\>gaga.pl
Can't locate object method "new" via package "NET::FTP" (perhaps you forgot to l
oad "NET::FTP"?) at C:\gaga.pl line 7.
Не пойму где ошибка.