Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Jolly Roger

by SubStack (Monk)
on Jul 26, 2006 at 23:37 UTC ( [id://563923]=obfuscated: print w/replies, xml ) Need Help??

Yarr, the Jolly Roger has a message for all ye perl pirates.
#! /usr/bin/perl $^X =~ y/0-9.//d, print join$",(sort 97.110.0.do{local $"= ""; $_= "@{[ sort split //,$~ ] }" ;eval ";42; y/$~/heotr/";s/(.)\1+ /\1/x;$_} , [split/ \//x,($_= chr++$| +$= /$]*$^F).$$_]-> [-- $.], crypt ($_ =pack ("I*", 1722938 ),$_) =~/ .(.. ..)/x,"#=6.!1" ^$~), chr(8). chr $=/ $^F+ ++$^F, #Sub Stack
Some words in the result might appear jumbled for for ye Windowers and ye Applers (and ye BSD-ers) because of differences in crypt() and $^X, but it's still a pirate! (Inspired by this)
(Updated for ye Gentoo-ers.)
Harr!

Replies are listed 'Best First'.
Re: Jolly Roger
by wulvrine (Friar) on Jul 27, 2006 at 11:09 UTC
    ARRGGH! Avast ye mateys! Walk the plank! KEEL-HAUL em! Just another perl pirate! I sees! Pirates found Jones locker ++!

    s&&VALKYRIE &&& print $_^q|!4 =+;' *|
Re: Jolly Roger
by chargrill (Parson) on Jul 27, 2006 at 00:32 UTC

    Result as seen on a Mac:

    perl X8N another pirate,

    Result as seen on (non-apple) FreeBSD:

    perl JeGm another pirate,

    I don't have anything else to run this on... :(



    --chargrill
    $,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}
      Here's the one-liner I used to generate the 1722938 in the code.
      perl -le'($c=crypt pack("I*",$_),pack"I*",$_)=~/Just/?print"$_ :: $c": +0 while ++$_'
      It might take a while, but you should be able to get a crypt() string with "Just" in it, then modify the /.(....)/ part to match. Hope that helps.
Re: Jolly Roger
by truedfx (Monk) on Jul 27, 2006 at 06:25 UTC
    Some words in the result might appear jumbled for for ye Windowers and ye Applers (and ye BSD-ers)

    You can add Linuxers to that list: I get "Just another perl5.8.8 pirate!", which is probably not what you were going for, on Gentoo. /usr/bin/perl is a symlink to perl5.8.8 here, so $^X doesn't end in /perl.

    Harmless though, so now I guess I'll need to figure out what you're doing. :)

Re: Jolly Roger
by tweetiepooh (Hermit) on Jul 28, 2006 at 14:27 UTC
    I get
    charperl another pirate!
    where char is a ASCII box symbol (bit like a T)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://563923]
Approved by chargrill
Front-paged by grinder
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-07-23 03:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.