split /\s+/
would probably be even better as
split ' '
>perl -e "@f = split(' ', ' a b c '); print scalar @f 3 >perl -e "@f = split(/\s+/, ' a b c '); print scalar @f 4
' ' does the same thing as /\s+/, but it ignores leading spaces.
In reply to Re^2: Getting Multiple inputs
by ikegami
in thread Getting Multiple inputs
by gzayzay
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |