in reply to how to reverse an array refference and return an array reference on the spot

mysub({ list => [reverse @{$anon_array}] });

Derefence the array, reverse it, then copy it into a new anonymous array.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

  • Comment on Re: how to reverse an array reference and return an array reference on the spot
  • Download Code

Replies are listed 'Best First'.
Re^2: how to reverse an array reference and return an array reference on the spot
by betterworld (Curate) on Aug 23, 2006 at 18:30 UTC
    For your information: In contrast to [@stuff], the construct \(@stuff) returns a list of references to the elements of @stuff.