in reply to Re^2: unshifting by reference
in thread unshifting by reference

The thing is that unshift needs an array (syntactically), not an array reference. And the way to get an (entire) array from a reference is to say @$aref, or @{ $something->{that}{returns}[1]{aref} } for more complex expressions.  To address a single element of the array, you'd say $aref->[$index].

(The Data::Dumper module is to easily print out complex data structures. I just used it for demo purposes — you of course don't need it to unshift the value.)