?
Solved

easy if statement question

Posted on 2003-02-22
3
Medium Priority
?
146 Views
Last Modified: 2013-12-25
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.
0
Comment
Question by:derek4716
  • 2
3 Comments
 

Author Comment

by:derek4716
ID: 7999597
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! :)
0
 

Accepted Solution

by:
qwerty1234 earned 400 total points
ID: 8001052
I'll be happy to receive your free points.
0
 

Author Comment

by:derek4716
ID: 8001074
Your welcome, i'm surprised that it took so many hours for someone to respond :)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question