in reply to Splitting two digits

You want to split on the empty string or pattern: my @fields = split '', $text;

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: Splitting two digits
by broquaint (Abbot) on Jan 08, 2003 at 11:56 UTC
    You want to split on the empty string or pattern
    Just a quick note while the subject has been bought up - a string passed to split is auto-magically converted into a regex, with the sole exception of providing a q{ } (a single space) as the pattern (see. the docs for more info on this behaviour). This ambiguity was raised on p5p recently and the discussion can be followed here.
    HTH

    _________
    broquaint