I have a one character string that i want to increment through the alphabet - how can I do that?
11/10/2006 10:20:22 PM
use magic. Since I don't know any perl, I would do@letters = {'a','b',.....'z'};foreach $letter ( @letters ){ print $letter;}you get the idea. I have absolutely no doubt that there is a way to do this in perl in one short line.[Edited on November 10, 2006 at 10:38 PM. Reason : or use chr: http://tyby.bke.hu/perl/cookbook/ch01_05.htm]
11/10/2006 10:33:54 PM
nah too much codeI have a string var that I want to increment by one character onlyat first it looked like $char++ would work but now it doesn't any more [Edited on November 10, 2006 at 10:44 PM. Reason : s]
11/10/2006 10:44:02 PM
^Did you even follow that link?
11/10/2006 11:13:14 PM
good point - i just figured the link was describing the code you postedgot it. thanks.
11/10/2006 11:23:06 PM