We don't bite newbies here... much | |
PerlMonks |
Re: Deleting intermediate whitespaces, but leaving one behind each wordby Athanasius (Archbishop) |
on Dec 05, 2017 at 06:35 UTC ( [id://1204928]=note: print w/replies, xml ) | Need Help?? |
Hello Feneden, and welcome to the Monastery! No need for the join, just replace each occurrence of one or more whitespace characters with a single character:
Update: Looking again at the thread title, it appears you may also want to remove trailing whitespace at the end of the string:
Output:
Hope that helps,
In Section
Seekers of Perl Wisdom
|
|