Title: Message
Use the prefix operator:
 
$ perl -e '$x = "a"; print ++$x, "\n";'
b
 
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, February 23, 2004 8: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?


This electronic message contains information, which may be confidential, privileged or otherwise protected from disclosure. The information is intended to be used solely by the recipient(s) named. If you are not an intended recipient, be aware that any review, disclosure, copying, distribution or use of this message or its contents is prohibited. If you have received this message in error, please notify the sender and delete this message from your system. Employees of the company are prohibited from making defamatory statements and from infringing copyright or any other legal right. Any such communication or infringement is contrary to company policy and outside the scope of employment.


_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to