http://www.perlmonks.org?node_id=1042388

Doctrin has asked for the wisdom of the Perl Monks concerning the following question:

Hello dear Monks ) Here's some code:
my $r = 300; my $g = 'g' . $r; print "$g\n"; #would be 'g300', that's ok $r = 500; print "$g\n"; #would be 'g300', but wanted 'g500'
So, is there a way to make $g change as $r changes? Thanks in advance.