in reply to Re: what is the function should I need to use for trim white spaces ?
in thread what is the function should I need to use for trim white spaces ?
Assinging to $_ without localizing it is dangerous.
(local $_ = $before) =~ s/^\s+|\s+$//g;
or
(my $after = $before) =~ s/^\s+|\s+$//g;
should be used in just almost all cicumstances.
|
|---|