Re: perl sort query

2007-06-19 Thread Rob Dixon
pauld wrote: John W. Krahn wrote: It sorts fine here: $ perl -le' print for @x = qw/200610011733 200610012057 200610011029 200610010928 200610011220/, ""; print for sort @x; ' 200610011733 200610012057 200610011029 200610010928 200610011220 200610010928 200610011029 200610011220 2006100117

Re: perl sort query

2007-06-19 Thread pauld
> $ perl -le' > print for @x = qw/200610011733 200610012057 200610011029 200610010928 > 200610011220/, ""; > > print for sort @x; > ' > 200610011733 > 200610012057 > 200610011029 > 200610010928 > 200610011220 > the time is the last 4 digits (hhmm) so the first is 17:33 then 20:57 then 10:29 then

Re: perl sort query

2007-06-18 Thread John W. Krahn
pauld wrote: I want to sort a hash of hash by date&time and then extract some of the data. From the data ive got i can contruct a key that is mmddhhmm and i do this ##error trap absent entries if ($endan=~m/\d{2}:\d{2}\s+\d{2}/ && $stan=~m/\d{2}:\d{2}\s+\d{2}/ ) {my %daylist; #