References to Simulate Multi-Dimensional Arrays
$totalStores = 3; $store = "asdfddddd"; for ($num = 1; $num <= $totalStores; $num++){ open (STOREINV, "$store${num}.txt"); my @store = <STOREINV>; $allStores[$num] = \@store; } for ($x=1; $x<= $totalStores; $x++){ $invRef = $allStores[$x]; for ($i=0; $i <= $#$invRef; $i++){ print "$$invRef[$i] "; } print"\n"; }