A fun little script that prints out two little haikus. Took me about 2 hours. I'm sure you can figure this one out.. :)
#!/usr/bin/perl
foreach $l([[48869,2,4],[41131,7,2],[39071,4,3],[37821,6,3],[32954,
6,3],[57080,10,3],[59526,7,2]],[[54454,7,3],[46498,7,3],[49910,4,3]
,[55466,5,3],[52888,6,3],[54702,6,3],[58296,6,3],[54247,8,3],[62957
,0,4],[50822,4,4],[49324,3,3],[60393,3,3],[59526,7,2]],[[51626,10,3
],[63468,7,4],[59615,10,3],[55262,9,3],[34264,11,1]],[[33227,9,3],[
43913,2,3],[55180,10,3],[35540,3,3],[46770,7,3],[59526,7,2]],[[51174
,6,3],[65275,7,3],[58287,9,3],[37598,7,3],[43244,10,3],[62909,2,3],
[41639,4,3],[38551,3,3],[47512,8,3],[49143,5,3],[33253,9,1]],[[53415
,4,3],[62427,9,3],[50401,8,3],[59347,9,3],[64710,8,3],[63973,1,3],[
43182,2,3]]){print l($l);}sub l{$l=shift;my $o;foreach $r(@{$l}){$o
.=lc(substr(crypt(pack("L",$r->[0]),"sh"),$r->[1],$r->[2]));}$o=~
s{/n}{\n}g;$o=~s{/s}{ }g;$o;}
In reply to a simple one
by akis
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.