Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Sorting Criteria

by sgifford (Prior)
on Aug 05, 2003 at 18:48 UTC ( #281121=note: print w/replies, xml ) Need Help??


in reply to Re: Sorting Criteria
in thread Sorting Criteria

That will work if days and months are zero-padded. Otherwise, "1/11" will compare equal to "11/1".

Replies are listed 'Best First'.
Re: Re: Re: Sorting Criteria
by Cine (Friar) on Aug 05, 2003 at 20:03 UTC
    Yeah, silly me
    sub sorter { sprintf"%04d%02d%02d",$hashYear{$a},$hashMonth{$a},$hashDay{$a} <=> sprintf"%04d%02d%02d",$hashYear{$b},$hashMonth{$b},$hashDay{$b} }


    T I M T O W T D I

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2022-10-07 16:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (30 votes). Check out past polls.

    Notices?