Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: string increment

by holli (Abbot)
on Sep 13, 2005 at 07:32 UTC ( [id://491504]=note: print w/replies, xml ) Need Help??


in reply to Re: string increment
in thread string increment

The behaviour is the same as if you increment a number, only the "numbers" are not 0-9, but a-z. The simplest way to see that is to start "counting" from "a".
$s = "a"; for (1..702) { print $s++, "\n"; }
prints
a b c ... z aa ab ac ... az ba bb bc ... zz


holli, /regexed monk/

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (9)
As of 2024-03-28 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found