At 5:10 PM -0500 10/21/04, David Nicol wrote:
when a lexical variable is not written to between getting assigned
from a constant and getting interpolated, replace the value in the
string at compile time

example:

sub statename{
   my $name = 'david';
   return "hello my name is $name";
}

Wouldn't you need to add taking a ref of the var, to invalidate this optimization? Specifically for this case:


sub statename {
    my $name = 'david';
    ${\$name} = 'liz';
    return "hello, my name is $name";
}


Liz

Reply via email to