Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://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":



  • 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.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 17:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found