Re: perlsub

From: Daniel Staal <DStaal(at)usa(dot)net>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: perlsub
Date: 2003-10-05 17:23:22
Message-ID: 4180496.1065356602@[192.168.1.50]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

--On Sunday, October 5, 2003 18:53 +0200 Nabil Sayegh
<postgresql(at)e-trolley(dot)de> wrote:

> Thanks for your answer.
>
> The snippet was just an example.
> What I really want(ed) to do was arbitrary regex search/replace.

I think your problem is that Perl only does one level of
interpolation: variables in variables just don't get looked at.

You might be able to do this in a two-level search/replace: the first
finds the values in the data string, and the second replaces
placeholders with the correct values, but I'm not exactly sure if it
would work.

I'd take this to a Perl forum. You need an expert.

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author. Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes. This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Gatts 2003-10-06 04:55:24 dropping users that start with ';'
Previous Message Nabil Sayegh 2003-10-05 16:53:04 Re: perlsub