Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id AEEF44766BF for ; Thu, 9 May 2002 19:08:21 -0400 (EDT) Received: from post.webmailer.de (natpost.webmailer.de [192.67.198.65]) by postgresql.org (Postfix) with ESMTP id CE6AF476778 for ; Thu, 9 May 2002 19:07:51 -0400 (EDT) Received: from ianb (pD95170E2.dip.t-dialin.net [217.81.112.226]) by post.webmailer.de (8.9.3/8.8.7) with ESMTP id BAA06556; Fri, 10 May 2002 01:07:51 +0200 (MET DST) Content-Type: text/plain; charset="iso-8859-1" From: Ian Barwick To: Vincent Stoessel , pgsql-sql@postgresql.org Subject: Re: escaping arrays in perl dbi Date: Fri, 10 May 2002 01:09:27 +0200 X-Mailer: KMail [version 1.4] References: <3CDA83BB.5000006@xaymaca.com> In-Reply-To: <3CDA83BB.5000006@xaymaca.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200205100109.27473.barwick@gmx.net> X-Archive-Number: 200205/83 X-Sequence-Number: 7719 On Thursday 09 May 2002 16:12, Vincent Stoessel wrote: > Hello All, > I am trying to figure out how I need to change the string below in > order to do an insert into my table using perl dbi. perl seems to choke > on the curly brackets. It's choking on the unescape quotes... > $dbh->do("update basket set f_order =3D'{"apple",0}' where cap =3D'I'"); qq is your friend: $dbh->do(qq|update basket set f_order =3D'{"apple",0}' where cap =3D'I'|); Type=20 perldoc perlop into a nearby commandline and look for the section "Quote and Quote-like Operators" for more info. Ian Barwick