It's an offset printer
What's left of the code will now modify the faithful $_.
s/m[ou]|[-\dA-ln-z.\n_{}]|\$_=//gx; # remove garbage and noise
s/(.)(?{$*=''})/('$*.='.(++$#%2?'':"$0;").'pop;')x(ord($1)-31).'$*'/gee;
s/((.(\e\[.m)*|.){77})/$1\n/g; # reshape for printing
- First, remove a lot of things:
- all letters except m
- dashes, curlies, newlines, and the m followed by u
or o (thus preserving the first one)
- and also the $_= bit
- For every character (.), execute this: (?{$*=''})
(that is: initialize the deprecated $*)
- Then replace it with:
- First pass of /e:
"$*.=pop;"x(ord($1)-31) . $*
or
"$*.=$0;pop;"x(ord($1)-31).$*,
depending on the parity of the deprecated $#.
- (note that the pop takes a character off @ARGV each
time, no matter which character you used (either the one on top of
@ARGV or a video reversed space))
- Second pass: replace this with the actual result.
- Put newlines every 77 characters.
Explanation: $_ holds characters that represent
numbers. These are counted as offsets from the character before space.
For example, <space> is 1, ! is 2, " is 3, and so on...
These represent the length of the on and off strings.
ord($1)-31 is the formula to get these values.
Previous | Next
Copyright © 2000-2001, Philippe "BooK" Bruhat.