in reply to Sorting hash values
because each key (such as "sse_date") can only appear once in a given hash. So that code will simply produce a hash with two keys and effectively one row of data. Rather I assume you mean that you want to have an array of hashes, something like%fetch= (sse_date => 4934056723, bld_num => 7.3.998.0.0, sse_date => 4934099999, bld_num => 7.3.1003.0.0, sse_date => 4949999999, bld_num => 7.3.1089.0.0);
In that case you would see something likemy @fetch = ({sse_date => 4934056723, bld_num => '7.3.998.0.0'}, {sse_date => 4934099999, bld_num => '7.3.1003.0.0'}, ... );
and go from there.my @sorted = map { $_->{bld_num} } sort { $a->{sse_date} <=> $b->{sse_ +date} } @fetch;
|
|---|