nysus has asked for the wisdom of the Perl Monks concerning the following question:
my $variable = 3; my $string = "Variable: ${\$variable}\n"; print $string; #results in "Variable: 3" $variable = 4; print $string; #still results in "Variable: 3" but I'd like it to result in "Variable +: 4"
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon";
$nysus = $PM . $MCF;
Click here if you love Perl Monks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dynamic interpolation in a string with a scalar variable?
by NetWallah (Canon) on Nov 30, 2015 at 22:30 UTC | |
|
Re: Dynamic interpolation in a string with a scalar variable?
by choroba (Cardinal) on Nov 30, 2015 at 21:03 UTC | |
by nysus (Parson) on Nov 30, 2015 at 21:08 UTC | |
by hippo (Archbishop) on Nov 30, 2015 at 22:37 UTC | |
by nysus (Parson) on Dec 01, 2015 at 00:48 UTC | |
|
Re: Dynamic interpolation in a string with a scalar variable? -- aka Delayed String Interpolation
by Discipulus (Canon) on Dec 01, 2015 at 08:59 UTC | |
|
Re: Dynamic interpolation in a string with a scalar variable?
by Laurent_R (Canon) on Dec 01, 2015 at 11:32 UTC |