The stupid question is the question not asked | |
PerlMonks |
Reverse Alphabetically Sorting an arrayby matra555 (Monk) |
on Jan 09, 2005 at 23:17 UTC ( [id://420765]=CUFP: print w/replies, xml ) | Need Help?? |
It's easy enough to do:
But if you have to do that with a lot of arrays in one program, you can save on typing by putting it into a sub:
and then just call reversi(@yourarrayhere) UPDATE: Modified sub code to follow jZed's suggestion. UPDATE: Fixed spelling error pointed out.
Back to
Cool Uses for Perl
|
|