in reply to Incrementing a variable alphabetically

Hi rsriram

You can do this exactly as you have said...
$a="a"; $a++; print $a; # prints b

Replies are listed 'Best First'.
Re^2: Incrementing a variable alphabetically
by leocharre (Priest) on Jul 19, 2007 at 13:38 UTC
    This has to be one of the weirdest things I've ever seen about perl. I had no idea. I feel as if I just found out my wife is really a brunette.
      Hee hee. Dragged this up:

      perl -le 'for($c="McD"; $i<167990; $i++, $c++) {} print $c'