in reply to Replacing whitespaces with a regex
Just do
whithout any if. If there is multiple whitespace, it will be replaced, if not, nothing happens.$words =~ s/\s\s+$/ /;
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
In Section
Seekers of Perl Wisdom