Just another Perl shrine | |
PerlMonks |
Create reference to sorted anonymous arrayby Digioso (Sexton) |
on Mar 16, 2016 at 14:28 UTC ( [id://1157939]=perlquestion: print w/replies, xml ) | Need Help?? |
Digioso has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks, my Google-Fu so far didn't produce any results for my question so I'm trying to obtain the answer here. :) To keep it simple I creates a small test script. I'm creating a new array and give a reference of it to a function which simply prints the array elements. Now I want to do the same for a reverse sorted array (basially reverse @array) without having to save the reverse output into a second array but so far I'm struggling to do that. Now I could simply do: My question is: Is there a way to do this without @array2 ? Can I use blubb() directly with the reverse sorted @array ? So far I haven't been able to come up with the syntax for this. :( Thanks a lot in advance.
Back to
Seekers of Perl Wisdom
|
|