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.
In reply to Re: Reference is experimental
by Anonymous Monk
in thread Reference is experimental
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |