use strict; use warnings; use Devel::Peek; my $hIn = {string => 'abc', number => 5 }; print "#*** Setting...: " . q{$x=$hIn->{string}} . "\n"; my $x = $hIn->{string}; # we assigned a new value to $x BUT # Devel::Peek::Dump claims that $x has PV = "abc"\0 # !!!! ???? print STDERR "#*** " . q{$x = $hIn->{number};} . "\n"; $x = $hIn->{number}; Devel::Peek::Dump($x); # but after being used in an interpolation # Devel::Peek::Dump says that $x has PV = "5"\0 print STDERR "#*** " . q{print "<$x>\n"} . "\n"; print "<$x>\n"; Devel::Peek::Dump($x); print "#*** Resetting...: " . q{$x=$hIn->{string}} . "\n"; $x = $hIn->{string}; # we assigned a new value to $x BUT # Devel::Peek::Dump claims that $x has PV = "abc"\0 # !!!! ???? print STDERR "#*** " . q{$x = $hIn->{number};} . "\n"; $x = $hIn->{number}; Devel::Peek::Dump($x); # but after being used in an interpolation # Devel::Peek::Dump says that $x has PV = "5"\0 print STDERR "#*** " . q{"$x = $hIn->{number};"} . "\n"; $x = "$hIn->{number}"; Devel::Peek::Dump($x);