in reply to Re^2: Occurence List
in thread Occurence List
However, when you
use strict;writing
$foo++;will cause perl to complain (if you have not declared (and thus created) $foo before),
while writing
will cause no complaints, even if you never used this index before(or a higher one), or never told Perl how big @bar should be. You will have to declare @bar, of course. So these two examples are not comparable. And I believe the second example actually is where we see autovivication at work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Occurence List
by Anonymous Monk on Oct 11, 2012 at 10:44 UTC | |
by Anique (Acolyte) on Oct 11, 2012 at 11:45 UTC | |
by Anonymous Monk on Oct 12, 2012 at 07:26 UTC | |
by Anique (Acolyte) on Oct 12, 2012 at 08:39 UTC | |
by Anonymous Monk on Oct 12, 2012 at 08:48 UTC |