Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm new to programming Perl and am writing a routine that needs to FTP. I get the following error and do not know if my site is missing a library or ?? - nobody else here knows what the err is. Any ideas?
perl -w mypgm.pl Can't locate object method "new" via package "Net::FTP::A" at /usr/opt +/perl5/lib/5.6.0/aix/IO/Socket.pm line 162.

Replies are listed 'Best First'.
Re: Error from missing Net::FTP module?
by halley (Prior) on Apr 20, 2004 at 17:34 UTC
    The Net::FTP module is only one component of a bundle or library of networking modules. You can't just install it by copying FTP.pm into a directory called Net/. It depends on some of the other components in the bundled library.

    The message you got is telling you that it could not do a Net::FTP::A->new() call, so that's a good sign that Net/FTP/A.pm is missing.

    There is a right way to install bundles of modules and a wrong way. The proper installation methods vary, depending on your platform and packaging preferences. Look for installation instructions with the bundle.

    --
    [ e d @ h a l l e y . c c ]

      You are correct, file A.pm is not there. Thanks!!!
Re: Error from missing Net::FTP module?
by Fletch (Bishop) on Apr 20, 2004 at 17:26 UTC

    Run perl -MNet::FTP -e 0 at your shell prompt. If that produces an error you don't have Net::FTP installed and need to procure it. If it doesn't produce an error then you've got a problem with your code (but since you didn't post any of it no one's really going to be able to help much further).