in reply to taking white space out between closing and opening tags
split the problem: first get the string, then condense it. Assuming you can't use any of te std XML/HTML modules to get the text, you could try:
--Davesub condense { $_[0] =~ s/\s+/ /g } $in =~ s/(<tag>)(.*?)(<\/tag>)/ $1 . condense($2) . $3 /ge;
|
---|
In Section
Seekers of Perl Wisdom