As has been said by others before, this is not going to work, since the shebang line is interpreted by the OS; however, everyone else so far also seems to have added that it's not perl that does this, which is something I think the original author of the question already understood, since he explicitely said that they had an environment variable set to perl's location.
The real reason why it still doesn't work is that the shell is not involved in interpreting that line, either; it's done by the OS itself.
And as far as the question itself is concerned, what keeps you from having perl in a standard location? Even if you have different OSes which have perl in different places by default, you could probably just roll your own perl packages that install to /opt/local or something similar - it'd probably can't hurt to have the same perl version with the same features built in and the same modules installed on all affected machines, anyway. :)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||