My first try. As usual comments etc appreciated.
Assuming saved as japh.pl
Usage: japh.pl
or japh "string" "another STRING" ...
where parameters should contain ('A'-'Z','a'-'z' or ' ')
e.g. perl japh.pl "we apologise for" "any inconvenience"
#!/usr/bin/perl
my($o)=('999 120420 122420422 422 122
494949333491 4994744941 20420120420 522 333
494 494 494 091 091 022 999
424 425499494429 42949342494 994945949949
440 449 442149442190 994949409 149498997990
999 949 442 102 242 142 249
902449 494 901 949 043 349
449402 149 902 849 022 694
9021979474190949220');$o=~s/\s+//gs;$o=~y!0-9!\\/\-_|<>VX !;
for$ii(($#ARGV>=0)?@ARGV:('*534@!./4(%2','0%2,@(!#+%2')){my(
$m,$b,$t)=("\n","\n","\n\n");for(split//,$ii){my$d=(ord($_)&
31)*3;$t.=substr($o,$d,3).chr(32);$m.=substr($o,$d+81,3).chr
(32);$b.=substr($o,$d+162,3).chr(hex(20));}print"$t$m$b\n";}
In reply to YA(JAPH)
by dingus
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.