- or download this
use strict;
use warnings;
...
$arr[0]->[0] = "xyz"; $arr[0]->[1] = "123";
for my $e (@arr) { print "Case 2 after: $e: $e->[0] $e->[1]\n" }
}
- or download this
Case 1 before: ARRAY(0x61ddc8): abc def
Case 1 before: ARRAY(0x61ddc8): abc def
...
Case 2 after: ARRAY(0x61de28): xyz 123
Case 2 after: ARRAY(0x315918): abc def
Case 2 after: ARRAY(0x315990): abc def
- or download this
my @arr = ( [@list] ) x $nelts;
- or download this
my @arr = map { [@list] } 1 .. $nelts;