#!/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 \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;
IyEvdXNyL2Jpbi9wZXJsCiMgeW91ciBjb2RlIGdvZXMgaGVyZQoKcHJpbnQgIlN0YXJ0XG4iOwokbnVtX3BvcnRzID0gMzsKJGxvZzJfcG9ydHM7Cm15IEBtdWx0aV9hcnJheSA9ICgpOwpwdXNoIEBtdWx0aV9hcnJheSwgKFswLDEsIjIiXSk7CnB1c2ggQG11bHRpX2FycmF5LCAoWzEwLDExLCIyMiJdKTsKcHVzaCBAbXVsdGlfYXJyYXksIChbMTAwLDExMSwiMjIyIl0pOwoKJHNpemVfbTEgPSBzY2FsYXIgKEBtdWx0aV9hcnJheSkgLSAxOwoKCXByaW50ICJGaXJzdCBMb29wXG4iOwpmb3JlYWNoICRpICgwLi4kc2l6ZV9tMSl7CglwcmludCAiUm93ICRpIDogXEBtdWx0aV9hcnJheVskaV0gXG4iOwp9CglwcmludCAiU2Vjb25kIExvb3BcbiI7CmZvcmVhY2ggJGkgKDAuLiRzaXplX20xKXsKCWZvcmVhY2ggJGogKDAuLjIpewoJJHZhbF90aW1lc18yID0gJG11bHRpX2FycmF5WyRpXVskal0gKiAzOwoJcHJpbnQgIlJvdyAkaSwgQ29sdW1uICRqOiAkbXVsdGlfYXJyYXlbJGldWyRqXSAgYW5kICR2YWxfdGltZXNfMiBcbiI7Cgl9Cn0KCXByaW50ICJUaGlyZCBMb29wXG4iOwpmb3JlYWNoICRpICgwLi4yKXsKCXByaW50ICJSb3cgJGkgOiBAJG11bHRpX2FycmF5IFxuIjsKfQoJcHJpbnQgIkZvdXJ0aCBMb29wXG4iOwpmb3JlYWNoICRpICgwLi4yKXsKCWZvcmVhY2ggJGogKDAuLjIpewoJcHJpbnQgIlJvdyAkaSwgQ29sdW1uICRqOiAkbXVsdGlfYXJyYXlbJGldWyRqXSBcbiI7Cgl9Cn0KCiNwcmludCAkbnVtX3BvcnRzOwojcHJpbnQgJGxvZzJfcG9ydHM7CnByaW50ICJEb25lIjs=
Start
First Loop
Row 0 : @multi_array[0]
Row 1 : @multi_array[1]
Row 2 : @multi_array[2]
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 :
Row 1 :
Row 2 :
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