Rather, "split" is the same as "split /\s+/"
Actually, it's not. The only way to avail yourself of the magical default split whilst processing other than $_, is to use ' ' or " " in place of the regex. See the first and last examples below:
C:\test>p1 $_ = ' the quick brown fox ';; print join'|', split;; ## default split no args (leading null field +omitted) the|quick|brown|fox print join'|', split /\s+/;; ## \s+ includes leading null field |the|quick|brown|fox print join'|', split / /;; ## same as split /\s/ |||the|quick||||brown|fox print join'|', split ' ';; ## Same as no arg split the|quick|brown|fox
In reply to Re^2: about split
by BrowserUk
in thread about split
by halfcountplus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |