Here's an idiomatic way,
That problem is called "normalizing whitespace". This solution depends on the whitespace-devouring nature of magical split.my $text = ' The perl '; $text = join ' ', split ' ', $text;
After Compline,
Zaxo
In reply to Re: removing the white spaces
by Zaxo
in thread removing the white spaces
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |