Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: string does not contain

by aging acolyte (Pilgrim)
on Jan 22, 2003 at 15:41 UTC ( #229052=note: print w/replies, xml ) Need Help??


in reply to string does not contain

TMTOWTDI

negate the if to an unless:

my $string = "foo bar baz"; print "no hello" unless $string =~ /hello/;
A.A.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://229052]
help
Chatterbox?
[Corion]: A good morning to everybody! It's Friday ;)

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2017-06-23 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (536 votes). Check out past polls.