|
to all who responded; THANKS! it
worked!
----- Original Message -----
Sent: Monday, February 23, 2004 10:44
AM
Subject: RE: counting differently
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
create a letter 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
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