in reply to How to build a better mousetrap (or a variable to hold a column-measuring scale)
use 5.10.0; $_=join"+",map{$n=$_*10;sprintf" %-5s",$n%100||$n}1..22; s/ /-/g; # replace blanks with dashes s/-/|/; # make first dash into a pipe sign $_.='|'; # add pipe sign to the end say; __END__ |---10---+----20---+----30---+----40---+----50---+----60---+----70---+ +----80---+----90---+----100--+----10---+----20---+----30---+----40--- ++----50---+----60---+----70---+----80---+----90---+----200--+----10-- +-+----20---|
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to build a better mousetrap (or a variable to hold a column-measuring scale)
by roho (Bishop) on Sep 13, 2019 at 12:52 UTC |
In Section
Seekers of Perl Wisdom