Todd <> wrote:
> Hi,
>
> When I use split, there are serveral case frequently occured:
>
> case1:
>
> split # default to split ' ', $_
>
> case2:
>
> split /xxx/ # default to split /xxx/, $_
>
> case3:
>
> split ' ', expr # ????
>
> I do think case3 is most frequently used,
Not by me. When I use split on something other than $_, I almost
always use a pattern other than ' ', which I guess would be case4.
After a brief grep through some code, it looks like the order from most
used to least used would be case2 > case1 > case4 > case3
> but why i've to type ' '
> every time, why there are no simpler syntax to use in this case?
You could define a subroutine name splitd (d for default, as in ' ' being
the default pattern)
Xho
--
--------------------
http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.