in reply to japhy blabs about regexes (again)
or indeed (thanks to MZSanford for this one):if ($blah=~m/^\s/) { $blah=~s/^\s+//; }
and for trailing - use rindex :).if (index($blah," ")) == 0 { $blah=~s/^\s+//; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: japhy blabs about regexes (again)
by japhy (Canon) on Jul 17, 2001 at 18:45 UTC |