The result of Dumper
It appears in other parts of your code you populate INTERFACE/ROUTINGTABLE in two dimensions correctly, so same deal to access it, perl way
my $ref = [ [ 1..3], [9..11] ]; for my $first ( @$ref ){ for my $item ( @$first ){ print $item; } } __END__ 12391011
The perl way :)
my $ref = [ [ 1..3], [9..11] ]; for my $xi ( 0 .. $#{ $ref } ){ for my $yi( 0 .. $#{ $ref->[ $xi] } ){ print $ref->[ $xi ][ $yi ]; } } __END__ 12391011
See also references quick reference, Data::Diver, Re: Parsing SOAP::Lite results (with Data::Diver)
Great, an update , just mark it How do I change/delete my post?
In reply to Re: How to traverse a two dimentional array in a constructor?
by Anonymous Monk
in thread How to traverse a two dimentional array in a constructor?
by Hossein
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |