Your regex is fine. split returns the stuff around the regex; in this case, the resulting first element is the empty string before the regex. But you can obtain the desired behavior by using the special first argument ' ' for split:
my @ar = split( ' ', $str );
the lowliest monk
In reply to Re: Nagging space after splitting
by tlm
in thread Nagging space after splitting
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |