Sorry for the wrap-around.
c:\@Work\Perl\monks>perl -wMstrict -le "my $old = '|---+----10---+----20---+----30---+----40---+----50---+----60---+- +---70---+----80---+----90---+----100--+----10---+- ---20---+----30---+----40---+----50---+----60---+----70---+----80---+- +---90---+----200--+----10---+----20---+----'; print qq{>$old<}; ;; my $fill = '--+----'; ;; my $new = qq{|-$fill}; $new .= grad($_*10) . $fill for 1 .. 22; die 'nope' unless $new eq $old; print qq{>$new<}; ;; sub grad { return $_[0] % 100 ? $_[0]%100 . '-' : $_[0]; } " >|---+----10---+----20---+----30---+----40---+----50---+----60---+---- +70---+----80---+----90---+----100--+----10---+---- 20---+----30---+----40---+----50---+----60---+----70---+----80---+---- +90---+----200--+----10---+----20---+----< >|---+----10---+----20---+----30---+----40---+----50---+----60---+---- +70---+----80---+----90---+----100--+----10---+---- 20---+----30---+----40---+----50---+----60---+----70---+----80---+---- +90---+----200--+----10---+----20---+----<
Give a man a fish: <%-{-{-{-<
In reply to Re: How to build a better mousetrap (or a variable to hold a column-measuring scale)
by AnomalousMonk
in thread How to build a better mousetrap (or a variable to hold a column-measuring scale)
by roho
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |