go ahead... be a heretic | |
PerlMonks |
Re^5: How do I quickly strip blank space from the beginning/end of a string?by ikegami (Patriarch) |
on Jul 22, 2009 at 04:22 UTC ( [id://782167]=note: print w/replies, xml ) | Need Help?? |
$x =~ /\s/
if (rindex($x," ") == 0 || rindex($x,"\r") == 0 || rindex($x,"\n") == 0 || rindex($x,"\t") == 0)
And then there's
You should be concentrating on writing code that actually works before worrying about operations that take 0.00001 second.
In Section
Seekers of Perl Wisdom
|
|