in reply to How do I remove whitespace at the beginning or end of my string?
Benchmark using the above example:$str =~ s/^\s+//; $str = reverse($str); $str =~ s/^\s+//; $str = reverse($str);
's_reverse' 42017/s -- -12% -48% 'unpack_A' 47847/s 14% -- -41% 'MRE_regx' 80645/s 92% 69% --
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Answer: How do I remove whitespace at the beginning or end of my string?
by repellent (Priest) on Jan 30, 2012 at 00:08 UTC | |
by choroba (Cardinal) on Jan 30, 2012 at 09:04 UTC | |
by repellent (Priest) on Jan 31, 2012 at 05:01 UTC |