
how to build two dimensional array?
Quote:
> I tried this once, but ran into weird problems. Eg. I had
>assignments like:
> $host{$net}{$addr} = "nodename";
>and then wished to do something like:
> foreach $n (keys %host) { # This was ok..,gave all $NET values
> foreach $a (keys %host{$n}) { # Fails, as %host{$n} is illegal
Not having easy access to perl5 right now I can't test this, but you
don't get automagical dereferencing in perls o you have to be explicit e.g.
foreach $net (keys %host)
{
foreach $addr (keys %{$host{$n}})
{
but I could be horribly wrong :-)
Hope this helps,
Mike
--
Mike Stok | The "`Stok' disclaimers" apply.
http://www.{*filter*}com.net/~stok/ | The inevitable WWW page (?)