is short for$ret{$j}[$i]
$ret{$j}->[$i]
In lvalue context (e.g. on the left of a "="), -> and other dereference operators will autovivify the reference. That means dereference operators will automatically create a variable of the required variable type (e.g. ->[...] will create a hash) and place a reference to it in the variable being dereferenced. This only happens if the variable being dereferenced is undef. In other words,
is short for$ret{$j}[$i]
( $ret{$j} //= [] )->[$i]
when used as an lvalue.
In reply to Re: which line(s) establishes a 2d arrray
by ikegami
in thread which line(s) establishes a 2d arrray
by DanielM0412
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |