Do you know where your variables are? | |
PerlMonks |
Re: TRIM in Perl?by samurai (Monk) |
on Sep 10, 2002 at 15:36 UTC ( [id://196722]=note: print w/replies, xml ) | Need Help?? |
No, that will NOT drop the leading and trailing spaces. Only the leading spaces (you are anchored by "^"). There's no sub for trimming strings in perl. The best way is probably to just go ahead and bite the bullet:
You can write your own trim() function to automate this if you wish.
--
In Section
Seekers of Perl Wisdom
|
|