Ask a Question related to PERL Modules, Design and Development.
-
Ilja #1
Sorting Hash of Hashes with HEAP module
Hi,
I would like to use the Heap module from CPAN to sort Hash of Hashes by
values,
keeping track of what pairs of keys belong to what values.
I am new to OO programming, so I don't quite understand how I can use
the Heap module for that.
The SYNOPSIS provided in the documentation for Heap:
use Heap::Elem::SomeInheritor;
use Heap::SomeHeapClass;
$elem = Heap::Elem::SomeInheritor->new( $value );
$heap = Heap::SomeHeapClass->new;
$heap->add($elem);
does not help me at this point. I don't see how one can create and get
attributes of the $elem, if needed(if that is the way to go).If anyone
has used Heap with Hash of Hashes before or knows how to do that, I
would appreciate any help.
Ilja Guest
-
hash of hashes
Hi all. How can I create $Subject for future population? -- Yours truly, WBR, Paul Argentoff. Jabber: paul@jabber.rtelekom.ru RIPE: PA1291-RIPE -
XML parse - hash of hashes
Greetings, I am fairly new to Perl and to XML and I’m trying to (1) parse a XML document (snippet attached), (2) update specified data using a... -
Accesing hash of hashes
Hello: I am trying to create and access a multidimensional hash. For example the following works ====== $route {$routeDest} = $cost ; print... -
Sort a hash based on values in the hash stored as arrays of hashes
Hmm. I'm not quite sure if I got the subject right, but I'll try to explain. :-) I've got a hash of elements stored like this: $VAR1 = {... -
iterating through hash of hashes
I'd like to iterate through a hash of hashes and get all the values. How do I do that? The following works for me. But it seems a bit convoluted...



Reply With Quote

