If you have to have multiple version of perl on the same box (which I do), you can point to the one you need in your PATH.

This is easy if you have multiple versions of perl on a windows box -- just set the PATH statement.

It's relatively easy to do in UNIX as well. In the perl script, use:

#!/bin/env perl

and set your PATH accordingly.

I'm writing scripts in a large company with multiple sites targeting thousands of machines running Win32, Linux, Solaris 8-9-10, Solaris 2.6, Solaris 2.51, SunOS 4.1.3. Login accounts and perl are not standardized corporate-wide, so I'm at the mercy of dozens of SA's who only worry about their location.

Some boxes have /usr/bin/perl (pointing to /bin/perl) but not /usr/local/bin/perl and vice-versa. Not foolproof, but I set paths to both and the "#!/bin/env perl" will find at least one.

But in the case of thousands of target machines running different OSs needing to run the same scripts but with no control over the SAs, we place the perl binaries of different OS's on a server. Logging in (using specific application ids) on a target machine would set/ensure the PATH points to the correct OS's perl on the server.


In reply to Re: Smooth perl upgrades by shockers
in thread Smooth perl upgrades by saintmike

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.