I'm not sure I'd want that second print "@_\n" to print aaa bbb.I'd want it to. Consider this:
I'd expect that to print "aaa". This is pretty much at the heart of the reference-counting model at the heart of perl. Similarly to how the fact that the lexical var getting freed on scope exit doesn't free the return value in:my @a = qw(aaa bbb); my $r = \$a[0]; @a = (); print $$r;
sub f { my $x = ...; return $x }
Dave.
In reply to Re^10: Use of freed value in iteration
by dave_the_m
in thread Use of freed value in iteration
by js1
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |