-2
我正在創建一個循環,其中打印了以下數據n次。因此,考慮:」Perl嵌套循環以不同模式打印出兩個數組n次
n = 9;
@a = (1, 2 ,3);
@b = (a, b, c);
$a[0] = 1 $b[0] = a
$a[0] = 1 $b[1] = b
$a[1] = 2 $b[2] = c
$a[1] = 2 $b[0] = a
$a[2] = 3 $b[1] = b
$a[2] = 3 $b[2] = c
$a[0] = 1 $b[0] = a
$a[0] = 1 $b[1] = b
$a[1] = 2 $b[2] = c