in reply to Error using CPAN to install modules

Welcome to the Monastery!

Are you behind a proxy/firewall? This may need some configuration. If you run cpan from the command line, if it's your first time running it you'll get asked a bunch of questions about various configurations options.

Also when posting code, output or error messages please use <code></code> like so:

#!/usr/bin/perl

Replies are listed 'Best First'.
Re^2: Error using CPAN to install modules
by anindita.81 (Initiate) on Nov 19, 2010 at 12:57 UTC

    I have tried to ping cpansearch.perl.org and it returns the message of unknown host.

      Is the computer in question able to access the internet at all? If not speak to your systems/network administrator. You've not told anything about the operating system in use, or the network to which it is connected. It could be something as simple as a firewall/proxy issue. The CPAN documentation covers this.

      If it's intentional that this server has no internet access, you could create a minimal mirror of CPAN on a system which does have internet access, and transfer it to the other system via CD/DVD/USB. See minicpan for further details of this.

      How do I post a question effectively? may be worth reading since you are new here.