Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: what is the function should I need to use for trim white spaces ?

by phaylon (Curate)
on Jan 14, 2006 at 23:14 UTC ( #523260=note: print w/replies, xml ) Need Help??


in reply to Re^2: what is the function should I need to use for trim white spaces ?
in thread what is the function should I need to use for trim white spaces ?

"I think the alternation in the s/^\s+|\s+$// version causes significant time costs in large applications."

Wait, isn't the single regex faster in your benchmark?

"Single Regex: 0.45 seconds
Double Regex: 2.27 seconds"

Ordinary morality is for ordinary people. -- Aleister Crowley
  • Comment on Re^3: what is the function should I need to use for trim white spaces ?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://523260]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2020-05-31 09:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?