I installed ActivePerl on my Win98. But still have the following error-

Can't locate Net/ in @INC (@INC contains: C:/Program Files/Perl/lib C:/Pro
gram Files/Perl/site/lib .) at line 2.
BEGIN failed--compilation aborted at line 2.

my perl -

use Net::FTP;
$ftp = Net::FTP->new("") || die "could not connect: $!";
$ftp->login("yyyy", "xxxx");
Who is Participating?
ppm is using XML syntax for its packaging description.
This could be an error in ActiveState's files (a missing ';' maybe, as in DATA>).
Maybe you should send them a mail with the faulty attached.
Net::FTP is a module, which comes with from's ftp site.
It is not a bundled module so you will not have it be default.
columbiaRiverAuthor Commented:
I don't find at, nor can I find ftp in net/ at the site.  Can you give more detail on where to download?
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

columbiaRiverAuthor Commented:
I don't find at, nor can I find ftp in net/ at the site.  Can you give more detail on where to download?
columbiaRiverAuthor Commented:
I installed according to the instrutions. But still have the same error.  I put in perl/lib/  Anything wrong?
Probably you do not have Net/ in one of the directories specified in INC:
  C:/Program Files/Perl/lib
  or C:/Program Files/Perl/site/lib
  or .  (the current directory)

I don't know if the 'libnet' includes it, but if it does, it was not installed correctly.
columbiaRiverAuthor Commented:
I thinkyou are right.  libnet doesn't include I was able to download and installed correctly. I just can't find any where on site.
Any suggestion?
According to the documentation on the  libnet bundle, the ftp module should be ârt of it.  I suppose you did not have a full libnet distribution installed.  When you say: 'I installed according to the instrutions' does this mean you only installed a single module file ?  The libnet bundle contains many files to be installed.

Anyway, you can find a correct libnet distribution at:

Get this and install it following the guidelines in the Readme file in the distribution.  This should install all you need to ftp away.

By re-reading this, I saw you are running the ActiveState (Windows) version.  Here is a simpler way to get the package installed using PPM:

First get connected to the internet.
Then, in a command line window type:
    C:> ppm
This would run the ppm program from ActiveState.  It allows you to install packages without any need to compile anything.  Just type:
    PPM> search libnet
Following message appears (it does in my case):
    Packages available from
To install, just type:
    PPM> install libnet
and all the work will be done, just be patient for a while.

There is also a command
    PPM> help
that explains what ppm can do, if you are interested.

Hope this works for you.
columbiaRiverAuthor Commented:
Thanks. After installation, I tried compiling my perl script again and seems passed the original error.  But now point to a config error of ftp -

syntax error at C:/Program Files/Perl/site/lib/Net/ line 86, near "&gt"

Compilation failed in require at C:/Program Files/Perl/site/lib/Net/ line
BEGIN failed--compilation aborted at C:/Program Files/Perl/site/lib/Net/ l
ine 21.
Compilation failed in require at line 2.
BEGIN failed--compilation aborted at line 2.

I checked line 86, it's the config info -
DATA&gt%NetConfig = (
      ftp_int_passive => '0',
      snpp_hosts => [],
      inet_domain => undef,
      test_exist => '1',
      daytime_hosts => [],
      ph_hosts => [],
      time_hosts => [],
      smtp_hosts => [''],
      ftp_ext_passive => '0',
      ftp_firewall => undef,
      test_hosts => '0',
      nntp_hosts => [''],
      pop3_hosts => [''],
There should be no "DATA&gt%" on that line
it should be just

%NetConfig = (
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.