Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
hash of arrays of arrays
use Data::Dumper qw(Dumper); my %hashmap; my @arr211 = qw(test211 test221 test321); my @arr212 = qw("test221" "test222" "test223"); my @arr22 = qw("test231" "test232" "test233"); my @arr23 = qw("test231" "test232" "test233" test123); my @arr231 = qw("test232" ); push ( @{$hashmap{a}}, \@arr211 ); push ( @{$hashmap{a}}, \@arr212 ); push ( @{$hashmap{b}}, \@arr22 ); push ( @{$hashmap{c}}, \@arr23 ); push ( @{$hashmap{c}}, \@arr231 ); #print Dumper \%hashmap; for my $mac (keys %hashmap) { #macs print "$mac is $hashmap{$mac}\n"; foreach my $row ($hashmap{$mac}) { #arrays zu macs # print Dumper $row; foreach my $cell (@{$row}) { #einzelne arrays # print Dumper $cell; if (exists $$cell[2]){ print "\t$$cell[2]\n"; } } } }
run
|
edit
|
history
|
help
0
OSTL
Sort
base N conversion
FOP utilities
Price_supriya
101734
perl
121JHgZzG4QMkDQwLJCifHAAsZAwvpqACY
Riyali-101738
Leonardo Numbers