in reply to
compound search and replace
You COULD do it. Whether you SHOULD do it is a different question...
s/("|\s\s)/($1 eq '"')?'':';'/eg;
[download]
I bet if you benchmarked that, it would be slower than the 2 separate searches, both because of the more complex search part, and the "/e" expression based replace.
--
Mike
Comment on
Re: compound search and replace
Download
Code
In Section
Seekers of Perl Wisdom