First, you should find all the executables on your system named perl. The most likely places are /usr/bin/perl and /usr/local/bin/perl. Check the directories in your path (`echo $PATH`) for other executables named perl. (If you're on Linux, you could use `locate` to find any outside your path. `locate -r /perl\$` [This will find directories named perl also.])

Once you've found all the perl executables, check their versions. /usr/bin/perl -v will tell you the version of the perl executable in /usr/bin; usr/bin/perl -V will tell you the configuration details as well, including the values in @INC. Figure out which executable is the right version and points to the right directories in @INC.

When you find the perl you want to use, let's say /usr/local/bin/perl, you probably want to rename the others. For example, if /usr/local/bin/perl is 5.6.1, and /usr/bin/perl is 5.6.0, rename /usr/bin/perl to perl5.6.0, and replace it with a link to the main perl: `ln -s /usr/local/bin/perl /usr/bin/perl`. However, you should make sure that scripts using /usr/bin/perl will continue to work after the switch to /usr/local/bin/perl. You can skip this step if you're unsure.

Now that you know you want to use /usr/local/bin/perl with the specific script that started this process, open the script in your editor and make sure the first line in #!/usr/local/bin/perl. If it's a web script, make sure your server is configured to use /usr/local/bin/perl to execute Perl scripts.

I hope that's helpful!


In reply to Re: Re: Re: Problems with environment variables. by chipmunk
in thread Problems with environment variables. by Anonymous Monk

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.