in reply to Smooth perl upgrades
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:
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.
|
|---|