Ever wanted to hang out with all your budz on #warez, but haven't yet mastered their way of typing? Don't fret! This snippet of obfuscated code will convert anything from STDIN to l33t speak!
For example:
"Hey! What's up, you guys? This IRC channel rocks!"
becomes:
"HEy!11!1!!!!!1!!!! whaTZZZZZ Up Jo0 GUyzzZ?!!?!!?!?? ThIZzZz IRC ChAnNEL rOxORzZzZZz!!!111!1"
while(<STDIN>){$_=lc($_);s/ou/oo/g;s/yo/jo/g;s/ck(s|\W)/xor$1/g;s/elit
+e/leet/g;s/[\,\']//g;while(/[\?][\?\.\!]*/){my $ex=xp("Q","E");s/[\?]
+[\?\.\!]*/$ex/;}while(/[\.\!]+/){my $ex=xp("E","1");s/[\.\!]+/$ex/;}s
+/Q/\?/g;s/E/\!/g;while(/s([\W])/){my $ex="z" x int(rand(6)+1);s/s([\W
+])/$ex$1/;}my $o;while (s/^(.)//s){my $c=$1;if(rand(1)>.5){$c=uc($c);
+}else{$c=lc($c);}if(rand(1)>.5){$c=~tr/iseto/15370/;}$o.=$c;}print $o
+;}sub xp{my ($a,$b)=@_;my $o=$a;my $len=int(rand(10)+5);for(my $x=0;$
+x<$len;$x++) {if(rand(1)>.4){$o.=$a;}else{$o.=$b;}}return $o;}
--
I write the code while the master is away!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.