- or download this
my @array = ();
- or download this
$array[1] = { val => "The initial value for 1", one => 'undef' };
$array[0] = { val => "The initial value for 0", one => \$array[1]{val}
+ };
$array[2] = { val => "The initial value for 2", one => \$array[1]{val}
+ };
$array[3] = { val => "The initial value for 3", one => \$array[1]{val}
+ };
- or download this
for my $i (0 .. 3) {
print "# $array[$i]{one}\n";
...
print "#\t${$array[$i]{one}}\n";
}
}
- or download this
# SCALAR(0x8114938)
# The initial value for 1
...
# The initial value for 1
# SCALAR(0x8114938)
# The initial value for 1
- or download this
for my $i (0 .. 3) {
$array[$i] = { val => rand(time)%3, one => \$array[1]{val} };
}
- or download this
print "\n";
for my $i (0 .. 3) {
...
print "# \t${$array[$i]{one}}\n";
}
}
- or download this
# SCALAR(0x8114938)
...
# 0
# SCALAR(0x81adcd8)
# 0