in reply to Re: Array Plus Operator
in thread Array Plus Operator
That's what I assumed, but thanks for the sanity check! Odd looking legacy code gives me deep paranoia when changing it!
The current theory in the office is that someone "fat-fingered" it... since the "+" and "[" are so close on the keyboard... otherwise... NFI
Or maybe you could pass in a default to use if $self->bar was false... so it was originally @{ $self->bar || +shift } and then the code evolved and someone replaced the "shift" with "[]" and left the "+" around, JIC
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Array Plus Operator
by AnomalousMonk (Archbishop) on Dec 15, 2017 at 18:08 UTC |