=head2 Subscripts
-An array is subscripted by specifying a dollar sign (C<$>), then the
+An array can be accessed one scalar at a
+time by specifying a dollar sign (C<$>), then the
name of the array (without the leading C<@>), then the subscript inside
square brackets. For example:
print "Darwin's First Name is ", $scientists{"Darwin"}, "\n";
-=head2 Slices
-X<slice> X<array, slice> X<hash, slice>
+You can also subscript a list to get a single element from it:
-A common way to access an array or a hash is one scalar element at a
-time. You can also subscript a list to get a single element from it.
+ $dir = (getpwnam("daemon"))[7];
- $whoami = $ENV{"USER"}; # one element from the hash
- $parent = $ISA[0]; # one element from the array
- $dir = (getpwnam("daemon"))[7]; # likewise, but with list
+=head2 Slices
+X<slice> X<array, slice> X<hash, slice>
A slice accesses several elements of a list, an array, or a hash
simultaneously using a list of subscripts. It's more convenient