in reply to Re: (tye)Re: Matching inconsistency in for loop
in thread Matching inconsistency in for loop
/m controls whether ^ and $ can match around newlines in the middle of the string. You want /s which controls whether . can match newlines. - tye (but my friends call me "Tye")if( $answer =~ /\Q$questions[$i]\E(.*?)\Q$questions[$j]\E/s ) { print qq(The answer is $1\n); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (tye)Re2: Matching inconsistency in for loop
by Rich36 (Chaplain) on Dec 13, 2001 at 02:41 UTC |