Can't Perl detect which version is installed or something?
It's not about the perl version being installed. Once you invoke a perl binary, its version is fixed.
But modern perl versions also have the ability to act like older perls. For example 5.012 has strict implied if you declare that version, but it can also act like an older perl and be non-strict by default.
Now you could argue that the perl binary should autodetect the version of the script, but that's not possible in the general case. A script can be valid in different versions of perl, and produce different output (I've written such a script for educational purposes.
So it could only guess, but guessing is very dangerous. And since Perl cannot be parsed without executing it, autodetection could have dangerous side effects.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.