#!/usr/bin/perl
# your code goes here
$num_ports = 3;
$log2_ports;
my @multi_array = ();
push @multi_array, ([0,1,"2"]); push @multi_array, ([10,11,"22"]); push @multi_array, ([100,111,"222"]);
$size_m1 = scalar (@multi_array) - 1;
foreach $i (0..$size_m1){
print "Row $i : $multi_array[$i] \n"; }
foreach $i (0..$size_m1){
foreach $j (0..2){
$val_times_2 = $multi_array[$i][$j] * 3;
print "Row $i, Column $j: $multi_array[$i][$j] and $val_times_2 \n"; }
}
foreach $i (0..2){
print "Row $i : $multi_array[$i] \n"; }
foreach $i (0..2){
foreach $j (0..2){
print "Row $i, Column $j: $multi_array[$i][$j] \n"; }
}
#print $num_ports;
#print $log2_ports;
IyEvdXNyL2Jpbi9wZXJsCiMgeW91ciBjb2RlIGdvZXMgaGVyZQoKcHJpbnQgIlN0YXJ0XG4iOwokbnVtX3BvcnRzID0gMzsKJGxvZzJfcG9ydHM7Cm15IEBtdWx0aV9hcnJheSA9ICgpOwpwdXNoIEBtdWx0aV9hcnJheSwgKFswLDEsIjIiXSk7CnB1c2ggQG11bHRpX2FycmF5LCAoWzEwLDExLCIyMiJdKTsKcHVzaCBAbXVsdGlfYXJyYXksIChbMTAwLDExMSwiMjIyIl0pOwoKJHNpemVfbTEgPSBzY2FsYXIgKEBtdWx0aV9hcnJheSkgLSAxOwoKCXByaW50ICJGaXJzdCBMb29wXG4iOwpmb3JlYWNoICRpICgwLi4kc2l6ZV9tMSl7CglwcmludCAiUm93ICRpIDogJG11bHRpX2FycmF5WyRpXSBcbiI7Cn0KCXByaW50ICJTZWNvbmQgTG9vcFxuIjsKZm9yZWFjaCAkaSAoMC4uJHNpemVfbTEpewoJZm9yZWFjaCAkaiAoMC4uMil7CgkkdmFsX3RpbWVzXzIgPSAkbXVsdGlfYXJyYXlbJGldWyRqXSAqIDM7CglwcmludCAiUm93ICRpLCBDb2x1bW4gJGo6ICRtdWx0aV9hcnJheVskaV1bJGpdICBhbmQgJHZhbF90aW1lc18yIFxuIjsKCX0KfQoJcHJpbnQgIlRoaXJkIExvb3BcbiI7CmZvcmVhY2ggJGkgKDAuLjIpewoJcHJpbnQgIlJvdyAkaSA6ICRtdWx0aV9hcnJheVskaV0gXG4iOwp9CglwcmludCAiRm91cnRoIExvb3BcbiI7CmZvcmVhY2ggJGkgKDAuLjIpewoJZm9yZWFjaCAkaiAoMC4uMil7CglwcmludCAiUm93ICRpLCBDb2x1bW4gJGo6ICRtdWx0aV9hcnJheVskaV1bJGpdIFxuIjsKCX0KfQoKI3ByaW50ICRudW1fcG9ydHM7CiNwcmludCAkbG9nMl9wb3J0czsKcHJpbnQgIkRvbmUiOw==
Start
First Loop
Row 0 : ARRAY(0x5642e3b09278)
Row 1 : ARRAY(0x5642e3b2bd80)
Row 2 : ARRAY(0x5642e3b2bed0)
Second Loop
Row 0, Column 0: 0 and 0
Row 0, Column 1: 1 and 3
Row 0, Column 2: 2 and 6
Row 1, Column 0: 10 and 30
Row 1, Column 1: 11 and 33
Row 1, Column 2: 22 and 66
Row 2, Column 0: 100 and 300
Row 2, Column 1: 111 and 333
Row 2, Column 2: 222 and 666
Third Loop
Row 0 : ARRAY(0x5642e3b09278)
Row 1 : ARRAY(0x5642e3b2bd80)
Row 2 : ARRAY(0x5642e3b2bed0)
Fourth Loop
Row 0, Column 0: 0
Row 0, Column 1: 1
Row 0, Column 2: 2
Row 1, Column 0: 10
Row 1, Column 1: 11
Row 1, Column 2: 22
Row 2, Column 0: 100
Row 2, Column 1: 111
Row 2, Column 2: 222
Done