[EMAIL PROTECTED] wrote:

No, I want to use Hash of Arrays.
I want to define the hash in a better manner say something similar to
the following way.

my %ModelPath =           {
                      "2800" => [EMAIL PROTECTED],
                      "4345" => [EMAIL PROTECTED]
                    };

I'm coming in late here but do you realize you are assigning a single hash ref to %ModelPath?


(IE I bet
 for(keys %ModelPath) { print "$_ is $ModelPath{$_}\n"; }

would print
HASH... is

instead of
2800 is ARRAY...
4345 is ARRAY...

like it seems you're expecting...

If you want it to be a hash ref you need
 my $ModelPath = { ... };
and if you want it to be a hash you'd need to use () instead of {}

Just a little observation :)

Lee.M - JupiterHost.Net

But by doing so I am not getting the values for the respective keys.


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to