hi all,
if i got a string say
i feel like going to swim today
if i have input say "swim"
and i wanna compare it with the sentence above, it will return true and go on to the rest of the program
cos normally we do this:
if ( swim eq sentence)
it will be true only if it matches the whole sentence so now i just it to return true as long as the sentence has the word swim and carry on with the program
any way in perl we can do this?
if i got a string say
i feel like going to swim today
if i have input say "swim"
and i wanna compare it with the sentence above, it will return true and go on to the rest of the program
cos normally we do this:
if ( swim eq sentence)
it will be true only if it matches the whole sentence so now i just it to return true as long as the sentence has the word swim and carry on with the program
any way in perl we can do this?
Comment