in reply to While two conditions
Do you mean something like this?
if( $text =~ /$query/i ) { while ( $text =~ /$query/gi ) { do_something(); } } elsif( $text =~ /$query_modified/i ) { while ( $text =~ /$query_modified/gi ) { do_something_different(); } } else { ## Is this possible? }
Or perhaps:
while ( $text =~ /($query|$query_modified)/gi ) { if( $1 eq $query ) { do_something(); } else { do_something_else(); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: While two conditions
by GotToBTru (Prior) on May 01, 2012 at 14:24 UTC |