I have written an application a cut down version of which apears here:
use strict;
use Net::FTP;
my $server = 'localhost';
my $user = 'user';
my $password = 'pw';
my $targetdir = '.';
my $ftp_file = '../flange';
print("Sending ftp file: ".$ftp_file);
my $ftp_session = Net::FTP->new($server, Debug => 1) or die "No ftp co
+nnection could be established";
$ftp_session->login($user, $password);
$ftp_session->cwd($targetdir);
$ftp_session->type("a");
$ftp_session->put($ftp_file);
$ftp_session->quit();
The op of this script ends up printing
Can't locate object method "new" via package "Net::FTP::a"
at /home/sjames5//lib/perl5/5.6.0/sun4-solaris/IO/Socket.pm line 162.
I have looked around pm and located other similar problems all of which pertain to old versions of modules. I took a look for a later version of socket.pm and found that the latest version was bundled with my version of perl.
$ perl -v
This is perl, v5.6.0 built for sun4-solaris
I would REALLY apreciate any help with this problem.
Thanks
--
Zigster
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.