Received: from antares.mcs.anl.gov (mcs.anl.gov [140.221.9.6]) by hub.org (8.9.3/8.9.3) with SMTP id MAA98142 for ; Sun, 16 May 1999 12:28:36 -0400 (EDT) (envelope-from selkovjr@xnet.com) Received: from xnet.com (selkovjr@selkovjr.xnet.com [205.243.141.67]) by antares.mcs.anl.gov (8.6.10/8.6.10) with ESMTP id LAA13696; Sun, 16 May 1999 11:28:25 -0500 Message-Id: <199905161628.LAA13696@antares.mcs.anl.gov> To: Julian Scarfe , pgsql-interfaces@postgreSQL.org From: selkovjr@mcs.anl.gov Subject: Re: [INTERFACES] Paths in DBD::Pg In-Reply-To: Your message of "Sun, 16 May 1999 16:34:44 BST." <373EE594.D51FE2BE@callnetuk.com> Date: Sun, 16 May 1999 11:29:33 -0400 Sender: selkovjr@xnet.com > I'd like to deal with geometrical data types, paths in particular, > efficiently in Perl using Pg. But Pg, understadably I suppose, just > returns a path as a scalar string like ((1,2),(3,4),(5,6)). Whereas I > can 'eval' a point fairly efficiently, it's not very efficient to turn a > long string such as the above into an array of arrays. You don't need to eval() individual points. If you eval() the whole thing it will give you one single array: @a = eval "((1,2),(3,4),(5,6))"; print "@a\n"; --Gene