When you do a command like this:

$ command

Then the system looks at the diretories in you path and executes the first matching one. To see your path do:

$ echo $PATH /bin:/sbin:/usr/bin:/usr/sbin: $

In this case we have 4 dirs in the PATH. The OS will look for 'command' in /bin, then /sbin....etc until it finds an exe called 'command' If there is one in /bin it will never look any further.

You are seeing the result of this behaviour. You will have (prabably a symlink) to 'perl' in /usr/bin so that is the first one found, and the one that gets executed when you ask for perl. If you do '/usr/local/bin/perl' (probable install location) you will get 5.8. Either call 5.8 on the shebang line as shown or replace the symlink in /usr/bin.....

To find all the perls on your system do:

$ locate -u $ locate bin/perl /usr/bin/perl /usr/local/bin/perl $
The -u flag to locate updates the DB (may take a minute, background with &, add a daily cron job...) and then we run it to find all the things on the system that match the search string.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print


In reply to Re: Upgraded perl but cant get to the new version by tachyon
in thread Upgraded perl but cant get to the new version by Clunk

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.