$alias = "johnq.smith1"; if ($alias =~ s/(\d+$)//) { $alias .= $1++; # $alias is now "johnq.smith2" }