in reply to Re: Reference is experimental
in thread Reference is experimental
I don't believe that postfix-deref was a replacement for shifting an aref... it's just a different way to dereference references.
The problem here is that $tmp[0] is a scalar, and back in the days where shifting refs was experimental, it assumed that anything not an array should be a reference to one.
As you've said, that experiment ended, and in 5.24.0+, we now get something a little different and descriptive (albeit still with an experimental warning):
perl -wMstrict -E 'my @a=(1); shift $a[0]' Experimental shift on scalar is now forbidden at -e line 1, at EOF Execution of -e aborted due to compilation errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Reference is experimental
by ikegami (Patriarch) on Oct 20, 2016 at 18:26 UTC | |
by Anonymous Monk on Oct 20, 2016 at 20:34 UTC |