in reply to Re: creating defined references to arrays of size zero
in thread creating defined references to arrays of size zero
my $CurrentArrayRef = $Stacks{nonexistant} || [];
Better yet:
This initializes $Stacks{ nonexistant } conditionally, and assigns its value to $CurrentArrayRef, thereby making this line:my $CurrentArrayRef = $Stacks{ nonexistant } ||= [];
unnecessary.# Now (re)store the contents into the stack $Stacks{nonexistant} = $CurrentArrayRef;
the lowliest monk
|
|---|