($_ = $before) =~ s/^\s+|\s+$//g;
Just as a minor nitpick I'd localise $_, but then I wouldn't bind with =~, I'd just
local $_ = $before; s/^\s+|\s+$//g;
or else
(my $after = $before) =~ s/^\s+|\s+$//g;
In reply to Re^2: what is the function should I need to use for trim white spaces ?
by blazar
in thread what is the function should I need to use for trim white spaces ?
by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |