in reply to Re: check if a number is in a list
in thread check if a number is in a list
my @array = (10,11,12,13,14,20,21,25); my $x = 1; my %array = map { $_ => undef } @array; if( exists $array{$x} ){ ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: check if a number is in a list
by Ido (Hermit) on Jun 26, 2005 at 05:21 UTC | |
|
Re^3: check if a number is in a list
by 5mi11er (Deacon) on Jun 27, 2005 at 16:33 UTC |