I am not sure what went wrong at the start. You said, "one of them didn't return the version for Time::Local".

Backing up...I suspect that your *nix system installed Perl 5.10.X although a newer version of Perl might be there, I think it is unlikely. When you get things working again, prompt>perl -V will tell you the version info. Nowadays all *nix systems come with some version of Perl already installed and many programs will just assume that "Perl is there".

You are new to Perl and and may not know that Perl comes with a whole lot of modules as part of its "core", Time::Local is one of those modules. See: Perl 5.10.1 Core Modules - T index. Navigate around to see the many other core modules. So Time::Local would have already been installed. That's why your statement that I quoted above confuses me.

I don't know how to get you "back to where you were to start with" because for one thing, I'm not really sure where you are! Let's say that disaster happens and you have to "start over" with a re-install...

I would recommend that you create a user account and use that account for installing further modules...if you need to. You do have the root password, but as you've seen that can get you into trouble! If you "mess up" as a user, worse case, you just delete that account and re-create it to start over. Being sys admin is cool, but dangerous.

I recently installed a local Perl lib with extra modules on a Linux student account. I explained what I did at this node: Re^3: Linux::Inotify2, adding sub-dirs to watches event-triggered.... Some tweaking will be required, but once you get this working, you can't "shoot yourself in the foot". Read the link that my post references in the tutorials. The ".cpan" directory is a "hidden file". You may just need to zap that thing to get you "back to square one".

I doubt that as a Perl beginner that you will need greater than Perl 5.10 for some time. I wouldn't worry about getting the "latest and greatest". If you just install additional modules in your user account, for the version of Perl that your system is using, I think you'll be fine.

Hope this helped.

Update: I re-read the original post again because perhaps I missed something. I'm not sure that anything at all is "broken". I could have just spewed out a bunch of advice that just doesn't matter at all! If you make a simple hello world program like this and it runs, then your Perl is working! "use Time::Local;" should not print anything unless there is an error.

#!/usr/bin/perl use warnings; use strict; use Time::Local; print "hello world\n";

In reply to Re: cpan problem by Marshall
in thread cpan problem by kishorekp

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.