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
In reply to Re: incrementing strings
by hv
in thread incrementing strings
by deathbygoats
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |