in reply to Re: about split
in thread about split
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
|
|---|