in reply to Reference is experimental
shift should normally be given an array, like shift @tmp;, that removes (and returns) the first element from @tmp. When you say shift $tmp[0];, shift thinks you're trying to give it an array reference (the first element of the array), so it tries to dereference $tmp[0], which doesn't work because it's not a reference and that's why you get the "Not an ARRAY reference" error. That's a feature that was added in Perl 5.14, but was experimental, which is why you get the "shift on reference is experimental" warning, and the feature was removed again in Perl 5.24. It was replaced by the Postfix Dereference Syntax.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reference is experimental
by stevieb (Canon) on Oct 20, 2016 at 14:39 UTC | |
by ikegami (Patriarch) on Oct 20, 2016 at 18:26 UTC | |
by Anonymous Monk on Oct 20, 2016 at 20:34 UTC |