|
|
| XP is just a number | |
| PerlMonks |
Re: More than one way to do it???by FouRPlaY (Monk) |
| on Dec 06, 2000 at 18:24 UTC ( [id://45286]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
If my understanding of merlyn's book and
or posts (I can no longer remember which, or even if
it was merlyn); you use \1 on the "right hand part"
of s///, and $1 on the "left hand part." Uh, so for getting rid double words you'd use: s/(\w+)\s+\1/$1/ Or something. But then again, I could be horribly, horribly, wrong. FouRPlaY Learning Perl Or Going To die() Trying
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||