?
Solved

how to add a library

Posted on 1999-01-18
4
Medium Priority
?
272 Views
Last Modified: 2010-03-05
I am trying to teach myself perl the 'look at other peoples code' method.  It is going well enough.  Now, I have collected a script that starts as follows:

#!/usr/bin/perl
## Program Name: fetch.cgi
use CGI;
use CGI::Carp (fatalsToBrowser);
use LWP::Simple;

My problem is the last line shown above.  I do not have the Simple routines.  How do I get them and install them.

Actually, I do not really understand how to add libraries at all, or where to find them.  By server is running linux on a 386 arcgitecture macgine if this matters.
0
Comment
Question by:jhurst
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 1210204
0
 

Expert Comment

by:tdv
ID: 1210205
The easiest way to install a module is using the CPAN module that is installed with recent perls.
Try (on the command line):
perl -MCPAN -e "install LWP::Simple"
CPAN stands for Comprehensive Perl Archive Network, a mirrored set of sites that store perl and its modules. The CPAN module automatically locates a CPAN site, downloads the module and installs it.
0
 
LVL 8

Author Comment

by:jhurst
ID: 1210206
tdv,

your method does not work.  

Actually, I discovered that I could just tar the file that ozo recommended in the appropriate place, end of story.

ozo, If you will post an answer, saying anything, I will give you the points.

0
 
LVL 84

Accepted Solution

by:
ozo earned 400 total points
ID: 1210207
You can search for modules at
http://cpan.perl.com/
or
http://theory.uwinnipeg.ca/mod_perl/cpan-search.pl
I'd also second tdv's suggestion on using the CPAN module http://www.perl.com/CPAN/authors/id/ANDK/CPAN-1.44.tar.gz
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question