D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] perl question - how to sort arrays of hashes? [SOLVED]

 

Dave Morgan wrote:

> >> @sorted = sort { $a->{mtime} <=> $b->{mtime} } @jpeg;

> Keeping the code as simple as possible so I can write and
> maintain it with my limited Perl skills is a higher priority.

@sorted = `ls -t *.jpg`;

Steve

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html