Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

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.


In reply to CGI will be with you, always by BooK

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!
  • 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, 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
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (4)
    As of 2014-08-31 04:37 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (294 votes), past polls