Help for this page
$text =~ s/\$(\w+)/$$1 * 2/egx; #I tried to double the age and succee +ded!
$AGE = 17; $tmpl = 'I am %s years old'; # note single quotes $text = sprintf $tmpl, $AGE * 2; # print I am 17 years old