in reply to Pulling white space off before/after string?
See perlfaq4: "How do I strip blank space from the beginning/end of a string?".
s/^\s+//; # strip white space from the beginning s/\s+$//; # strip white space from the end
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Pulling white space off before/after string?
by ecuguru (Monk) on Apr 17, 2007 at 04:58 UTC | |
by bobf (Monsignor) on Apr 17, 2007 at 05:09 UTC | |
by GrandFather (Saint) on Apr 17, 2007 at 05:06 UTC |