App-pl
view release on metacpan or search on metacpan
pod/examples.pod view on Meta::CPAN
> A8 52mm x 74mm B8 62mm x 88mm C8 57mm x 81mm
> A9 37mm x 52mm B9 44mm x 62mm C9 40mm x 57mm
> A10 26mm x 37mm B10 31mm x 44mm C10 28mm x 40mm
=item ANSI Background;Foreground Color Table
I<What color is a mirror? It depends whom you ask. ;-)>
You get numbers to fill into C<"\e[BGm">, C<"\e[FGm"> or C<"\e[BG;FGm"> to get
a color and close it with C<"\e[m">. There are twice twice 8 different colors
for dim & bright and for background & foreground. Hence the multiplication of
escape codes and of values to fill them.
This fills C<@A(RGV)> in B<-A> twice, the 2nd time looping over the 1st list,
as though it had been given on the command line. It maps it to the 16-fold
number format to print the header, swallowing every other number with 0-width.
Then the main program loops over it pairwise with C<$A(RGV)>, thanks to
B<-o2>, to print the body. Numbers are duplicated with C<(N)x2>, once to go
into the escape sequence, once to be displayed:
pl -o2A 1..8 -A '$_, $_+39, $_+8, $_+99' -B 'form "co: bg;fg"."%4d%.0s"x16, @ARGV;
( run in 2.141 seconds using v1.01-cache-2.11-cpan-f56aa216473 )