This is not very much obfuscated, but on the other hand,
it can adapt itself to your own configuration...
use CGI;@ARGV=grep{-e}map{"$_/CGI.pm"}@INC;$t=join'',map{chomp;$_}<>;%
+c=qw/
2.42 11628;2324;30658;2060;22472;16482;
2.46 11926;2386;31338;2119;23033;16933;
2.49 12067;2410;31706;2136;23294;17122;
2.56 13145;2535;33058;2258;24538;18297;
2.74 12378;2435;32675;2155;23993;17625;
2.753 12523;2462;33017;2179;24257;17849;
/;$c=$CGI::VERSION;map{$n{$_}++}(/(....)/g)for+map{substr$t,$_}0..3;@n
+=sort
keys%n;printf$c{$c}?"%s"x6:"Please, retry with this line:\n$CGI::VERSI
+ON ".
"%s;"x6,@n[split/;/,$c{$c}],(grep{$_[$_]=~/Just| ano|ther| Per|l ha|ck
+er/}+
map{$_[$i]=$_;$i++}@n)[2,1,5,0,4,3]
CGI was the biggest module I could find in the standard
Perl distribution, so I could be sure it would have what I
needed. chomp is used for portability reasons. I
hope this work on Macs too.
Note: If someone can find a core module that
hasn't changed in the last two or three years, I am
very interested! :-)
Update: I tested the script on several installs,
I now have 3 different lines for CGI version 2.56.
I am afraid that CGI is quite different between
platforms, installs and distributions... :-(
Other lines that might work for you:
2.46 11925;2386;31335;2119;23030;16931;
2.56 13142;2534;33055;2257;24535;18294;
2.56 13144;2536;33058;2259;24536;18296;
So If you don't get the expected result, remove the
line corresponding to your CGI version.
-
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>
<u> <ul>
-
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
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.