Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

CGI will be with you, always

by BooK (Curate)
on May 28, 2001 at 20:02 UTC ( #83742=obfuscated: 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{"$_/"}@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.

Replies are listed 'Best First'.
Re: CGI will be with you, always
by BooK (Curate) on May 29, 2001 at 01:32 UTC

    After complaining in Same is different?, and thanks to tye, I found out that the same program can actually change slightly between platforms and installations. Globals variables and stuff like temporary directories are the kind of stuff you mighht want to change. Silly me!

    Next time, I'll use the documentation: this shouldn't change between platforms/installs. :-)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://83742]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2023-10-02 20:34 GMT
Find Nodes?
    Voting Booth?

    No recent polls found