in reply to can't get $& to remove value in a substitution
If your $content contains more than one textarea, this will match from the beginning of the first textarea to the end of the last one. That makes the /g fairly useless.while ($content =~ m/(<textarea.*textarea>)/sg) {
You probably want:
Notice the *? non-greedy qualifier; that makes sure the first textarea> is matched.while ($content =~ m/(<textarea.*?textarea>)/sg) {
Of course, this might not be the source of the problem you're asking about, but it is one possible problem with your code.
--
Mike
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Greed is going to get you, was Re: can't get $& to remove value in a substitution
by zusuki-san (Initiate) on Oct 24, 2002 at 13:54 UTC | |
by RMGir (Prior) on Oct 24, 2002 at 14:55 UTC | |
by zusuki-san (Initiate) on Oct 25, 2002 at 09:43 UTC |