I have a function (let's call it foo(array_reference, ...)) that expects an array reference among other parameters. I want to have foo shift the array reference off the list of parameters passed to it directly to an array, without having to shift it off as an array reference and then separately convert that to an array.
What I want should be something like: my @bar = @{shift};
What I do not want, but am currently stuck with: my $bar = shift; my @bar = @{$bar}
The latter approach wastes lines, wastes memory, and causes me to hate the writer of this type of Perl code with a fiery passion. Help, please?