Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: regexp and substitute operator problemby BrowserUk (Patriarch) |
on Jul 08, 2003 at 06:51 UTC ( [id://272214]=note: print w/replies, xml ) | Need Help?? |
When I run your code, I get a quite different set of results from those you posted.
Which makes it difficult to try and answer your two questions. In any case, it is probably better to specify the regex more accurately so that you don't capture the unwanted values in the first place. This seems to do the trick on the sample you supplied.
The sequential double reference to 8p22 seems odd in context, but eliminating that and the other duplicate(s) is a simple step. Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
In Section
Seekers of Perl Wisdom
|
|