Gossamer Forum
Home : General : Perl Programming :

if $blah contains "blah"

Quote Reply
if $blah contains "blah"
Hi, I'm stuck when it comes to pattern matching!

What I need to do (for this new links mod i'm creating) is have it look through the $blah variable to check if it contains the word (blank category) anywhere.

like this:

Code:
|----- (lets say eq's Contains)
if($blah =~ "Blank_Category"){
$output qq~
<img src="blank_category.gif">
~;

I want to do this for all categories... (I already have everything planend out, worked out..) It's just when it comes to this part. I don't know hoto search the $blah variable to find the current category name.

can Anyone help? Or need more info?

Thanks!
Subject Author Views Date
Thread if $blah contains "blah" jacowhee 4000 Jun 30, 1999, 5:13 AM
Post Re: if $blah contains "blah"
jacowhee 3859 Jun 30, 1999, 5:16 AM
Post Re: if $blah contains "blah"
jacowhee 3867 Jun 30, 1999, 7:33 AM
Post Re: if $blah contains "blah"
polpus 3865 Jun 30, 1999, 3:50 PM