in reply to Perl Array - What an array contains
If my @capitals array contains only 'London' ...
An array contains only 'London' if it has only one element and that element is the string 'London':
c:\@Work\Perl\monks>perl -wMstrict -le "my $string = 'London'; my @capitals = split /,/, $string; if (@capitals == 1 && $capitals[0] eq 'London') { print q{contains only 'London'} } " contains only 'London'
... OR it contains all elements of my @capitals.
I don't understand what this requirement means. Can you please elaborate?
Give a man a fish: <%-{-{-{-<
|
|---|