Re: [Perl-unix-users] perl Hash help

2007-01-23 Thread Allegakoen, Justin Devanandan
---8< Easiest way would be to just specify the order in $k you want: ---8< Actually the easiest way would be to use Tie::IxHash::Easy; From the docs:- SYNOPSIS use Tie::IxHash::Easy; tie %x, 'Tie::IxHash::Easy'; --

Re: [Perl-unix-users] perl Hash help

2007-01-23 Thread Bill Luebkert
Mehta, Perdeep wrote: > Hi, > > I am looking for help to retrieve from a Hash of Hashes in insertion > order? I am not an expert in multi-dimensional Hashes, how could I use > Tie::IxHash module with a sub-Hash, if I could? > > Here is an example, I want to retrieve from sub-hash > %{$dir_cont

[Perl-unix-users] PDF Paragraphs

2007-01-23 Thread Ben Eagle
One of the last problems I am having, I need to make paragraphs in PDF API2, I have yet been able to get anything to work. Nor is there any good documentation anywhere on it, and the ones that there is do not work. Has anyone got this feature to work and if so and you please shed some light

Re: [Perl-unix-users] perl Hash help

2007-01-23 Thread Andy_Bach
If you want order, you need an array - hashes are unordered. As you're using count as keys, you can sort them (make its a numeric sort) but just push your hash on to an array (an "AoH") instead: while( my $f = readdir( DIR )) { next if( $f eq '.' or $f eq '..' ); my($t

[Perl-unix-users] perl Hash help

2007-01-23 Thread Mehta, Perdeep
Hi, I am looking for help to retrieve from a Hash of Hashes in insertion order? I am not an expert in multi-dimensional Hashes, how could I use Tie::IxHash module with a sub-Hash, if I could? Here is an example, I want to retrieve from sub-hash %{$dir_contents->{$item} in the insertion order. I