S
somebody
If I have an array like:
@arr = ('one', 'two', 'three');
And the varaible $myvar = 'two';
How do I check if $myvar matches 'two' in @arr?
I know I could iterate through the array with
a foreach statement, but was wondering if there
was a more efficient method.
-Thanks
@arr = ('one', 'two', 'three');
And the varaible $myvar = 'two';
How do I check if $myvar matches 'two' in @arr?
I know I could iterate through the array with
a foreach statement, but was wondering if there
was a more efficient method.
-Thanks