in reply to Idiomatic Split to Scalar Conversion

$foo=( split(/,/, $bar) ); is one way to do it.

~Particle *accelerates*

Replies are listed 'Best First'.
Re^2: Idiomatic Split to Scalar Conversion
by tadman (Prior) on Apr 29, 2002 at 22:49 UTC
    Try that with '-w' and you get warned. No fun, that.

    What I meant by idiomatic was "better, faster, cheaper" in terms of clarity, execution speed, and number of variables. As in, could be used in this particular circumstance with great confidence.

    The return value has to be the same as an equivalent split call, not just close, otherwise it's not really the same.