Is there a more efficient way of performing variable interpolation on a string's contents than the following?
I feel as though I'm missing something obvious here. Please be nice if I'm being really stupid :)my $string = "cheese"; my $need_to_interpolate = 'smell my $string\n'; print eval('"' . $need_to_interpolate . '"');
In reply to Variable Interpolation by reasonablekeith
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |