in reply to More than one way to do it???
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
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Answer: More than one way to do it???
by mirod (Canon) on Dec 06, 2000 at 23:41 UTC | |
by slocate (Novice) on Dec 07, 2000 at 11:33 UTC |
In Section
Seekers of Perl Wisdom