in reply to Re^2: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
in thread What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff

One argument in favor of such functions is that in many languages the elimination of free space at the beginning and end of strings is recognized as an important special case and built-in function provided for this purpose. Perl is one of the few in which there is no such special operation.

What are these "many languages" you speak of? Of the dozen of so languages I've used and can remember only a couple (probably only one) have some form of trim function. Rather than being "one of the few", Perl is in the vast majority in not providing a built in explicit trim function.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
  • Comment on Re^3: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff

Replies are listed 'Best First'.
Re^4: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
by likbez (Sexton) on Sep 15, 2020 at 12:34 UTC
    PHP, Javascript, Ruby, Julia and Python come to mind. In R you can use trimws() and set strip.white=TRUE for reading files.