Perl hashing problem
Hi all,
I have a problem with 2 hash tables in perl:
My first table contains <long files names> <size in byte>
As it comes without ordering on sizes, I want to sort it
in another hash table, so I make:
@New_Table = sort { $File_Table{$a} cmp $File_Table{b} } keys %File_Table;
but when I print both tables on the screen, New_Table is empty, why ??!
(I took it from a book, and also test it with '<=>' instead of 'cmp',
but I'm still stuck)
Any help will be greatly appreciated.
JY
--
Jean-Yves F. Barbier <jybarbier@wanadoo.fr>
"Text processing has made it possible to right-justify any idea, even
one which cannot be justified on any other grounds."
-- J. Finnegan, USC.
Reply to: