Help for this page
$string =~ s/ (?=[^{}]*})/_/g;
my @sub = qw(men boy girl); $string =~ s/(?<={)[^}]*(?=})/shift @sub/ge;