Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Pattern Matching Query

by blakem (Monsignor)
on Sep 17, 2002 at 12:55 UTC ( [id://198478]=note: print w/replies, xml ) Need Help??


in reply to Re: Pattern Matching Query
in thread Pattern Matching Query

A return value of 0 from index actually means it found the substr at position 0. An rv of -1 indicates failure. Therefore:
if (index('abcdefghijklm', $sorted_values) > -1) { # Do stuff... }

-Blake

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://198478]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-19 17:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found