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

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.