in reply to String replace with function

How can I do this? $str =~ s/\d+/&add($1)/gi; doesn't work

s/gi/ge - since i is case insensitive, e is eval ;-) And! capture to get $1:

$str =~ s/(\d+)/&add($1)/ge;

...and &add() is soo perl4...

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'