Wednesday, July 21, 2010

sorting an array..

@ascending = sort {$a cmp $b} @a;

@descending = sort {$b cmp $a} @a;
(OR)
@descending = reverse @ascending;

No comments:

Post a Comment