I've got a data structure like this:
$VAR1 = {
'news' => [
{
'title' => 'news1',
'content' => 'Article Contents...blah',
'date' => '08-03-01'
},
{
'title' => 'news2',
'content' => 'Article Contents...blah',
'date' => '07-20-01'
}
]
};
I need to sort @$news by $data->{news}[$ele]{date} where $ele is the index in the array. I tried sort {$data->{news}[$a]{date} <=> $data->{news}[$b]{date}} @{$data->{news}};, but that didn't work. any ideas. Maybe need to change how the date is stored? I'm open to anything. thanks.
__________________________________________________
<moviequote name="Hackers">
The Plague: [...]Well let me explain the New World Order. Governments and corporations need people like you and me. We are samurai. The keyboard cowboys. And all those other people out there who have no idea what's going on are the cattle. Mooo!
</moviequote>
mexnix.perlmonk.org