Cliff,
 
maybe as a Perl (but not programming) novice I am missing your point / application, but one could of course create an array @letter = (a..z) and walk through that, or if you are into Object Orientation createletter class with a next() member function that knows the alphabet.
 
By the way, a question of mine: could one overload the ++ operator (which I like better than Cliff's '+ 1') instead of this next() above, by the way, such that
$letter = 'a';
$letter++ gives you 'b'?  I guess you ned to hack the code for that?  Far-fetched perhaps...  Oh well.
 
Cheers, Pim
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 23 February 2004 14:52
To: [EMAIL PROTECTED]
Subject: counting differently

Is there a way to force a variable to walk through the alphabet the way it can numbers?
 
ie: for numbers:  $k=0; $k=$k+1; would give you 1
 
for letters $k='a'; $k=$k+1; this won't give you 'b'; but is there any way of doing this that will?
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to