Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,
I have a requirement to split a scalar into an array.

Example

Simple Input :

[a,b]

Output :

[ a, b ]

Input :

[''a,b'', c,   [   d,e],'fgh[],ijk',',']]

Output :

[ 'a,b', c [ d, e, ] [ fgh[],ijk , ] ]

Replies are listed 'Best First'.
Re: Scalar to Array
by Utilitarian (Vicar) on Aug 10, 2009 at 06:05 UTC
    We don't do code to spec here, we provide answers to those trying to learn.
    • What have you tried?
    • Where does it fail?
Re: Scalar to Array
by Anonymous Monk on Aug 10, 2009 at 06:23 UTC
      Good you could recall, I was wondering to myself that I have seen that same question many times before, it is almost like a deja vu familiarity....Good you could recall the nodes. :)


      Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.