Josh Narins | 18 May 02:35

Variables within variables.

Hi all.

What I want, in perl, would look like this.

$tal->{onething}->{ $tal->{otherthing} }

I tried

string:stuff${onething/${otherthing}}

but it didn't work.

Is this supported, or should I work around?

Thanks in advance.

I still have a suspiction that a SAX parser with heavy use of
memoization would be faster, but it's no trouble for me now.

I'm even getting close to being able to show off a primitive version of
the site I'm building.  I'll mention it here when appropriate.

Bruno Postle | 22 Jun 17:39
X-Face

Re: Variables within variables.

I was just fixing some (really stupid) mistakes in the Petal 
QUICKSTART pod documentation and found the answer to this question.

On Tue 17-May-2005 at 20:35 -0400, Josh Narins wrote:
>
> What I want, in perl, would look like this.
>
> $tal->{onething}->{ $tal->{otherthing} }
>
> I tried
>
> string:stuff${onething/${otherthing}}
>
> but it didn't work.
>
> Is this supported, or should I work around?

The Petal docs say this:

       You cannot write nested expressions such as:

          ${my_var/hello_world ${my_var/current_user}}

       This will NOT work. At least, not yet.

So I guess that means you can't :-P

--

-- 
Bruno

(Continue reading)


Gmane