Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: New golf game (for the extremely bored)

by ejf (Hermit)
on Feb 09, 2002 at 13:16 UTC ( [id://144348]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: New golf game (for the extremely bored)
in thread New golf game (for the extremely bored)

>Can someone explain that "a..gr" thing to me please?

Same as 1..200, really ;)

Basically you just use letters instead of numbers.

a..z yields the 26 characters of the alphabet,
a..az yields those and another 26 prefixed with a
a..bz yields those and another 26 prefixed with b
and so on. Same system, more "numbers" ...

Incidentally a..gr yields 7*26 + 18 "numbers".

update : as crazyinsomniac pointed out, the range-operator is discussed in more detail in perlman:perlop.
  • Comment on Re: New golf game (for the extremely bored)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://144348]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-24 19:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found