Link to home
Start Free TrialLog in
Avatar of derek4716
derek4716Flag for United States of America

asked on

easy if statement question

how, instead of saying if something eq something else, can you say IF SOMETHING INCLUDES SOMETHING ELSE?

for example i have $searchwords="hello world"

how can i make a statement that instead of looking to see if it equals thatm just looking to see if it includes that.

thanks.
Avatar of derek4716
derek4716
Flag of United States of America image

ASKER

I figured it out:

I used  if(somenthing =~ m/$search/i)



I am in the giving mood today :)  First person to post gets the points! Just my way of saying thanks for looking! :)
ASKER CERTIFIED SOLUTION
Avatar of qwerty1234
qwerty1234

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Your welcome, i'm surprised that it took so many hours for someone to respond :)