Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: ASCII Rulers

by petral (Curate)
on Apr 03, 2001 at 15:47 UTC ( #69266=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    sub ruler {
        my $n = 9 + shift; chop $n;
        join "", " ", map(" "x(9-/../).$_, 1..$n), "\n",
        "0123456789" x $n, "0\n"
  2. or download this
    sub ruler {
        my $n = shift;
        join"", " ", map(" "x(9-/../).$_, 1..$n/10), "\n",
        map(/.$/g, 0..$n), "\n"
  3. or download this
    perl -lwe 'print" ",map(" "x(9-/../).$_,1..$ARGV[0]/10),"\n",map/.$/g,0..shift'

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://69266]
[Corion]: Discipulus: Nah, I'm thinking of posting more short stuff, but not all of it is fit for, more something a bit longer than Twitter but shorter than my usual b.p.o module posts
[Corion]: But Google+ is tedious and I'd like to keep my posts on an open platform instead, which can be followed via RSS

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2017-05-26 07:42 GMT
Find Nodes?
    Voting Booth?