Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: sorting mm/dd/yy

by chipmunk (Parson)
on Dec 15, 2000 at 22:01 UTC ( #46877=note: print w/replies, xml ) Need Help??


in reply to Re: sorting mm/dd/yy
in thread sorting mm/dd/yy

Your way of calling a special sorting routine really isn't the way that feature was designed to be used.

Instead of declaring a sort block that calls your sort routine explicitly, with $a and $b as args, you should write a sub that processes $a and $b directly, and just give the name of the sub to sort. Here's an example:

sub backwards { $b cmp $a } sort backwards @a;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://46877]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2021-01-17 01:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?