I'm working on a pretty simple script that reads a bunch of txt files, turns those files' contents into hashes, and then prints an html page of those results.
Pretty basic stuff.
I can sort it by the file names pretty easily, but I need to figure out a way to sort the result hashes by different key/values. Basically it's sorting bibliographical information, so I would need it to do something like sort by $hash{title} or $hash{format}.
Is there any easy way to do this?
Thanks,
m
[devdaily.com...]
[edited by: jatar_k at 5:42 pm (utc) on June 10, 2004]
[edit reason] linked it up [/edit]
[perldoc.com...]
ie
sort {$a->{title} <=> $b->{title}} keys (%hash)
(as an anon sub, or pass the name of a function to break it out)
Sean