rahulme81 has asked for the wisdom of the Perl Monks concerning the following question:
Above string is passed to a function defined in another script where I am storing this in an array.
my @capitals= split(/,/,$string);Sometime $string can contain only one element as London
I have a logic which requires me to check
If my @capitals array contains only 'London'
OR
it contains all elements of my @capitals.
Please help !!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Array - What an array contains
by AnomalousMonk (Archbishop) on Aug 25, 2016 at 13:11 UTC | |
|
Re: Perl Array - What an array contains
by Eily (Monsignor) on Aug 25, 2016 at 12:02 UTC | |
|
Re: Perl Array - What an array contains
by Marshall (Canon) on Aug 25, 2016 at 18:41 UTC | |
|
Re: Perl Array - What an array contains
by hippo (Archbishop) on Aug 25, 2016 at 12:47 UTC | |
by pryrt (Abbot) on Aug 25, 2016 at 13:07 UTC | |
by AnomalousMonk (Archbishop) on Aug 28, 2016 at 21:40 UTC | |
by hippo (Archbishop) on Aug 25, 2016 at 13:27 UTC |