- or download this
A slice of an empty list is still an empty list. Thus:
@a = ()[1,0]; # @a has no elements
...
More generally, a slice yields the empty list if it indexes only beyon
+d the end of a list:
@a = (1)[ 1,2]; # @a has no elements
@b = (1)[0,1,2]; # @b has three elements
- or download this
use strict;
use warnings;
...
'world' => undef,
'goodbye' => undef
};
- or download this
$VAR1 = {
'mars' => 4,
'hello' => 1,
};
- or download this
my @arr = (10, 20, 30, 40);
...
40
];