Re: How to match string inside of array?
- From: Jim Gibson <jgibson@xxxxxxxxxxxxxxxxx>
- Date: Fri, 16 Dec 2005 15:34:35 -0800
In article <4YHof.11993$fY5.2618@trnddc02>, Jürgen Exner
<jurgenex@xxxxxxxxxxx> wrote:
> somebody wrote:
> > 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.
>
> perldoc -q contains
In my version (5.8.6) you have to search for "contained"
FYI to OP: this newsgroup is defunct; try comp.lang.perl.misc in the
future.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
.
- References:
- How to match string inside of array?
- From: somebody
- Re: How to match string inside of array?
- From: Jürgen Exner
- How to match string inside of array?
- Prev by Date: Re: How to match string inside of array?
- Next by Date: Re: How to match string inside of array?
- Previous by thread: Re: How to match string inside of array?
- Index(es):
Relevant Pages
|
|