The "normal" way to do this is with two substitutions: $str =~ s/^\s+//; $str =~ s/\s+\z//;. Is that not fast enough? I see a few problems with String::Strip:
Doesn't handle unicode whitespace when given utf8 input.
Truncates strings that contain null characters. (Also, will violate bounds if fed strings that perl wasn't able to put a "safety" null terminator on.)
When stripping leading spaces, ends up copying the whole string - something that the substitutions optimize away - which will be a disadvantage for large strings.
When copying the string, relies on overlapping strcpy working - something about which the C standard says "the behavior is undefined."