When you are counting in base-10 and you reach 99, you add a leading "1" instead of wrapping back to only "00". The magic autoincrement does the same with letters: when you reach the end of the alphabet, it adds a leading "a" while wrapping back instead of repeating a previous value.
This is also why "z" becomes "aa":
$ perl -e '$X = "z"; print $X, "\n"; $X++; print $X, "\n";' z aa
In reply to Re^3: How the auto-increment operator works?
by jcb
in thread How the auto-increment operator works?
by zapdos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |