Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Re: Sorting Criteria

by sgifford (Prior)
on Aug 05, 2003 at 18:48 UTC ( [id://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