not as confusing as it could be, but still a little difficult to guess what's going on
#!/usr/bin/perl -w
use strict;
$_="Just another Perl hacker";
my@x=(65,14,17,31,17,17,74,31,4,4,4,24,85,17,17,17,
17,14,83,15,16,14,1,30,84,31,4,4,4,4,78,17,25,21,19
,17,79,14,17,17,17,14,72,17,17,31,17,17,69,31,16,30
,16,31,82,30,17,30,18,17,80,30,17,30,16,16,76,16,16
,16,16,31,67,14,17,16,17,14,75,17,18,28,18,17);my%x
;while (my$x=shift@x) {$x{chr($x)}=[shift@x,shift@x,
shift @x,shift @x,shift @x];}sub c{my @e=split//,uc(
shift);my@ee;for(@e){my@ret=&a($_);$ee[$_].=$ret[$_]
for 0..4;}print join("\n",@ee)."\n\n";}sub a{my@d;my
($e)=@_;push@d,b($e,$_)for(@{$x{$e}});return@d;} sub
b{my($f,$e,$d)=@_;for(0..4){if($e>(2**(4- $_))-1){$e
-=(2**(4-$_));$d.=$f;}else{$d.=' ';}};return$d.' ';}
c($_)for split/\s/;
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.