my @sorted = @list[ map { substr( $_, 8 ) } sort map { convertdate( $list[$_]->{birth_date} ) . sprintf "%06d", $_ } 0 .. $#list ];