in reply to Dereference Empty(!) Array
The || operator forces scalar context on the left operand, so it returns the number of elements in the referenced array. If the array is empty, the number is 0, so || works and returns undef, i.e. empty array.@jazz = ( @{ $_[0] } || () );
|
|---|