in reply to Replacing whitespaces with a regex
Small variation of the previous solutions, replace any spaces (even 1 space) with 1 space:
for ( @array ) { s/\s+$/ / }
|
---|
In Section
Seekers of Perl Wisdom
in reply to Replacing whitespaces with a regex
Small variation of the previous solutions, replace any spaces (even 1 space) with 1 space:
for ( @array ) { s/\s+$/ / }
|
---|