Help with learning perl
I'm doing a program out of a book teaching me perl (I'm new to programming). The program is this:
#!/usr/bin/perl -w
use strict;
#auto2.pl
use warnings;
$a = "A9"; print ++$a, "\n";
$a = "bz"; print ++$a, "\n";
$a = "Zz"; print ++$a, "\n";
$a = "z9"; print ++$a, "\n";
$a = "9z"; print ++$a, "\n";
It works fine, but I really do not understand why the last line prints as "10" when, following the logic in the book and the previous lines, my thought would be it would print "0a". Can someone please explain this to me?
Thanks,
Phil
|