in reply to Removing extra spaces
s/\s(\s?)/$1/g
Match a single space, and optionally a second space. Capture that second space if it exists. Replace with the capture, which will be either nothing, or the second space.
Dave
|
---|
In Section
Seekers of Perl Wisdom