Using your own global substitution s!\s+! !g, but shortening everything else:
while (<DATA>) { next if !/^<item>/; s!\s+! !g; print "$_\n"; } __DATA__ <item>sample item text one <item>sample item text two <item>sample item text three <item>sample item text four
In reply to Re: formatting text
by Narveson
in thread formatting text
by texuser74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |