in reply to Re: parsing and evaluating a string
in thread parsing and evaluating a string

The down side to your solution is that it introduces spaces (because of the tr/+/ /) into the string that weren't in the original chr(n1)+chr(n2)+... sequence. The solution is to change the substiution

$str =~ s/char\((\d+)\) ?/chr($1)/eg;

Cheers,

JohnGG