in reply to ASCII Rulers
The sprintf would save a few strokes in your code but nothing significant. I'll take your word for it that there is a column 0. ;-)sub ruler { my($n,$r) = (int($_[0]+9)/10, ' '); $r .= sprintf"%10s",$_ for (1..$n); "$r\n" . '0123456789' x $n . "0\n"; }
123456789_123456789_123456789_123456789_123456789_123456789_
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: ASCII Rulers
by grinder (Bishop) on Apr 03, 2001 at 15:57 UTC |