There's no difference between these two lines
@{ $self->bar || +[] }; @{ $self->bar || [] };
since there is no ambiguity. [] returns a scalar - a reference to an anonymous, empty array - in either case. But the original author perhaps thought it was needed. AFAIK this doesn't behave different in any perl5.
In reply to Re: Array Plus Operator
by shmem
in thread Array Plus Operator
by SleepyJay
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |