in reply to Re: Re: Fastest (Golfish) way to strip whitspace off ends.
in thread Fastest (Golfish) way to strip whitspace off ends.

Halley,

I am curious as to what s/\n\z//s would actually substitute that the previous two substitutions already had not.

AFAICT, the \n\z would match any newlines before the end of the string, which should have been already taken care of s/\s*$//; (as \n is matched by \s) should have captured anyway (i might be missing something here, so please correct me if i am wrong.)

Also, I believe that \s+ should be faster(more efficient) in this case than \s* .

-enlil