in reply to incrementing strings

I think the easiest fix is to change the match for a substitution to do the increment:

if ($alias =~ s/(\d+)$/$1 + 1/e) { print $alias; } elsif ...

Hugo