Alex Cheung Tin Ka wrote:
>
> I have a problem about the list value.
> I have got a scalar say $a='a' and a list say @b = ('a', 'b','c');
> how can I check whether $a is one of the value in @b. Is there any
> easy way to do it and I got lost in perl.com's piles of documentation.
if ( grep $a eq $_, @b ) { ... }
use Quantum::Superpositions;
if ( $a eq any( @b ) { ... }
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]