http://www.perlmonks.org?node_id=1209146


in reply to Re^9: Create output from Perl hash
in thread Create output from Perl hash

I had not seen your latest post above when I replied below in Re^9: Create output from Perl hash. Your solution is probably fine if you're guaranteed that the number to be changed always starts with 91.

BTW, you don't need to put 91 between parentheses (but then have to use $1 instead of $2):

$add =~ s/91(\d+)?/$1/;