Re: sort by number...

2001-06-15 Thread Paul
--- David Gilden <[EMAIL PROTECTED]> wrote: > Good day, > > keys look like: Dowda_23241506142001 > > This is wrong, but not sure how the syntax is, > > Where are $a,$b coming from, I thought of a sub, but how do assign > $a, $b $a and $b are automagically assigned values. LEAVE THEM ALONE! =o

sort by number...

2001-06-15 Thread David Gilden
Good day, keys look like: Dowda_23241506142001 This is wrong, but not sure how the syntax is, Where are $a,$b coming from, I thought of a sub, but how do assign $a, $b foreach my $key (sort { /_(\d+)$/; $a <=> $b } (keys %subjects)) { # /_(\d+)$/ grabs the number at the end of the string,