in reply to Re: How to trim a line from leading and trailing blanks without using regex or non-standard modules
in thread How to trim a line from leading and trailing blanks without using regex or non-standard modules
I suppose your solution works only for blank " " and not for other whitespace characters like "\n"
So it's not exactly the same like with \s °
DB<11> $a="x \n \n \n " DB<12> $a =~ s/\s+$// DB<13> x $a 0 'x' DB<14>
The OP should be clearer about the semantics he wants.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
see also Re: How to trim a line from leading and trailing blanks without using regex or non-standard modules
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: How to trim a line from leading and trailing blanks without using regex or non-standard modules
by kcott (Archbishop) on Aug 15, 2020 at 11:02 UTC |