found 343100 0.71-3 thanks Anthony DeRobertis <[EMAIL PROTECTED]> writes:
> use Heap; > > my $heap = Heap->new; > my $elem; > > use Heap::Elem::Num(NumElem); > > foreach $i ( 1..100 ) { > $elem = NumElem( $i ); > $heap->add( $elem ); > } > > while( defined( $elem = $heap->extract_maximum ) ) { > print "Smallest is ", $elem->val, "\n"; > } To clarify, this is the example code from Heap(3) in version 0.70; with version 0.71, extract_maximum() should be replaced with extract_top(). Thanks, Matej -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]