in reply to Re: Any caveats in using unpack to right-trim? Why isn't it advertised more?
in thread Any caveats in using unpack to right-trim? Why isn't it advertised more?

Not nearly equivalent. \s matches much more than two characters. And this doesn't even handle the two characters it attempts to handle properly, since it doesn't trim <SP><LF><SP><LF>.

But it does show that an XS solution that starts at the tail and works in-place would be fastest.

This brings up my earlier comment, why doesn't builtin offer this???