There's more than one way to do things | |
PerlMonks |
Re: Variable scope issue- effect of "my" on hash ref keys, valuesby haukex (Archbishop) |
on Feb 26, 2020 at 13:16 UTC ( [id://11113435]=note: print w/replies, xml ) | Need Help?? |
I am disturbed by the fact that "extra fun" does not make into the Dumper output I'm pretty sure that's because my $x->{a}->[0] = "no you don't!"; is mostly equivalent to my $x; $x->{a}->[0] = "no you don't!";. From Private Variables via my(): All listed elements must be legal lvalues. ... The my is simply a modifier on something you might assign to.
In Section
Seekers of Perl Wisdom
|
|