Problems? Is your data what you think it is? | |
PerlMonks |
Re^4: How do I quickly strip blank space from the beginning/end of a string?by blahblahblah (Priest) |
on Jul 22, 2009 at 01:12 UTC ( [id://782138]=note: print w/replies, xml ) | Need Help?? |
Good point. I've tried the 3 methods below:
and and The rindex method is much faster on the data that has spaces; otherwise the substr method is the fastest. Any other good ideas, keeping in mind that the data (I think) won't often contain any trailing spaces?
In Section
Seekers of Perl Wisdom
|
|