|
|
| Do you know where your variables are? | |
| PerlMonks |
While two conditionsby welle (Beadle) |
| on Apr 30, 2012 at 23:57 UTC ( #968179=perlquestion: print w/ replies, xml ) | Need Help?? |
|
welle has asked for the
wisdom of the Perl Monks concerning the following question:
Dear Monks I have a long text stored in a variable $text (the problem is, the text must remain in this simple variable). I search with a Regexp in this variable through a while loop
What I'd like to do is to add another condition: **if $text =~ /$query_modified/gi {do_something_different();}** Why: the sub do_something must process some information depending on the presence of $query_modified in the variable $text. As these conditions may vary across $text, I need to run the two conditions in a way different as the next one proposed which is not good for me as I need to process the two conditions at the same time.
Is there a way to perform this?
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||