Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^4: Occurence Listby Anonymous Monk |
on Oct 11, 2012 at 10:44 UTC ( [id://998414]=note: print w/replies, xml ) | Need Help?? |
will cause perl to complain (if you have not declared (and thus created) $foo before), while writing Oh will it now?
So these two examples are not comparable. And I believe the second example actually is where we see autovivication at work. Yes, they really are exactly comparable, and no, the second example is not autovivification any more than the first example is autovivification -- neither is autovivification Growing an array is not autovivification. JavaScript doesn't support autovivification , try it if you have firefox ( Ctrl+Shift+K )
JavaScript supports growing arrays but not autovivification, but perl does supports it, undef becomes a hashref if you treat it like a hashref
In Section
Seekers of Perl Wisdom
|
|