⭐ in reply to How do I remove whitespace at the beginning or end of my string?
Regex::Common is also a good choice.
use Regexp::Common qw/whitespace/; $foo =~ s/$RE{ws}{crop}//g;
|
---|
In Section
Seekers of Perl Wisdom