From: mathew
Date: 2005-10-12T07:36:52+09:00
Subject: Re: Sort pseudo-lists
James Edward Gray II wrote:
> Well, if you can count on the data format, the following is pretty simple:
>
> irb(main):001:0> arr = eval "{{3.1, 1.3, 2.5, 2.1}, {2.1, 3.1, 2.4,
> 2.2}, {1.4, 2.2, 2.1, 4.2}}".tr("{}", "[]")
I'd just like to remind everyone that if the data is input by users,
calling eval on it is a really bad idea...
mathew
--
WE HAVE TACOS