"installed perl5 using perlbrew and installed Email using clan as Ken had advised."

Did you use the "perlbrew switch ..." command shown in the App::perlbrew documentation I linked to in my earlier reply?

You'll see "perl -v" after most of those "perlbrew switch ..." commands: this will tell you the current version of Perl that you're using. As I mentioned earlier, "Apple includes its own customised version of Perl": the "perl -v" output will probably indicate the version has been patched if you're still using the System Perl. Here's what I get when running that for the current version (i.e. perl) and the System Perl (i.e. /usr/bin/perl):

$ perl -v This is perl 5, version 18, subversion 1 (v5.18.1) built for darwin-th +read-multi-2level ...
$ /usr/bin/perl -v This is perl 5, version 12, subversion 3 (v5.12.3) built for darwin-th +read-multi-2level (with 2 registered patches, see perl -V for more detail) ...
"still getting the same error about @INC"

The "/Library/Perl/..." and "/System/Library/Perl/..." paths in @INC indicate the System Perl. If you are getting the same output, then you're still using the System Perl.

However, while that could indicate you haven't done "perlbrew switch ..." yet (or correctly), it's probably more likely to be related to your shebang line. [If you're still having problems (after all of this), advise us exactly how you're running your script: that may pinpoint the problem (if it still exists).]

I use the following shebang line for all of my Perl scripts:

#!/usr/bin/env perl

You can add options after that if you want (see perlrun). A common one you'll see in my posts is:

#!/usr/bin/env perl -l
"How do I make sure where is the version of perl what I just installed?"

"which perl" (from the command line) will tell you this. If it reports /usr/bin/perl, you're still using the System Perl: refer back to my earlier comments about "perlbrew switch ...".

-- Ken


In reply to Re^3: Can't locate Email/MIME.pm in @INC by kcott
in thread Can't locate Email/MIME.pm in @INC by netperl

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.