in reply to HOH again.. and tr/// and more..
Q2: you want a regex substitution, like s/^(\d)/chr(ord($1)+0x10))/e
Q3:
my @sorted_keys = map { s/_0*//; $_ } sort map { s/(\d+)/sprintf("_%08d",$1)/e; $_ } keys %hash
(that's the Schwartzian Transform approach, which might be more efficient, whereas the method that Grandfather suggested is easier to grasp)
|
|---|