An easy way
 
Define an array with the alphabet
@alphabet=("a","b",...)
$i=0
$temp=$alphabet[$i]   "meaning $temp="a"
$temp=$alphabet[$i+1] will now be "b"
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, February 23, 2004 6:52 AM
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