On 2020/11/05 10:09, Scott Baker wrote: > > Team: > > I lack the time and expertise to complete the PR I started > <https://github.com/Perl/perl5/pull/17999> to add `trim()` to core. > --- To be clear, what is 'trim' supposed to do in perl? When I do a 'man trim', I see what looks like a trim in the textutil::trim, but it looks like it might be related to Tcl? Either way, does it take 1 or 2 params, like shown for textutil::trim: trim "string", Regexp; Where to trim whitespace, you might have: trim "string", m{\s}; But in trim, it shows related trim functions: trim::trim{left,right,Prefix,EmptyHeading} Does trim, by itself, only trim the <??> at beginning or end or both? Is it intended to take a Regex, or is it only used to trim spaces, or what is the intended functionality? If it deletes before + after, would that imply a need (at least) for right+left trims? I looked at your link, but didn't intended functionality. Should I assume the trim there is of the same variety? ::textutil::trim::trim string ?regexp? Remove in string any leading and trailing substring according to the regular expression regexp and return the result as a new string. Does that imply variations on the function might also be needed? Sorry, I'm guessing there is some standard definition and maybe I accidently hit on it, but just trying to make sure. Thanks!Thread Previous | Thread Next