[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Help splitting encoded lists of lists



I get a scalar that contains an encoded list-of-lists, something like this:

$lol = '{{22, "foo o", "oof"}, {7, "bar b", ""}, {99, "x y, z", "bix baz"}}';

I want to split $lol into a nice 2D array so I can use members like:

@items[0][0] is 22
@items[0][1] is "foo o" (without the quotes)
@items[1][1] is 7
... and so on.

I can think of a whole lot of really awful ways to do this; what is the
most elegant (and hopefully efficient)?

Thanks,

  dm



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch