Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: string does not contain

by Hofmator (Curate)
on Jan 23, 2003 at 13:07 UTC ( #229299=note: print w/ replies, xml ) Need Help??


in reply to string does not contain

... and as nobody mentioned it so far, if you just match against a literal string like 'hello', then you could also use the index function:
# if 'hello' not contained in $string if ( index($string, 'hello' ) == -1) { # do something }

-- Hofmator

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2016-06-29 02:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (366 votes). Check out past polls.