Re: Assign value to variable
Okay all you gurus, here is my next challenge :-)
I need to convert a Perl LDAP query result to an array. So far I have
been able to create an variable name; for example
$name = "ret[8]['givenname'][0]";
$value = "Mike"
What I want to do now is assign the $value to the $name, as in
$$name = $value;
but that does not work. I need the end result to be:
$ret[8]['givenname'][0] = "Mike";
Geoff Berrow <blthecat@ckdog.co.uk> wrote in message news:<hsj7o0l8939v88l7ma8geuocga2u2dnsa8@4ax.com>. ..
> I noticed that Message-ID:
> <d3354680.0410261044.11722022@posting.google.com > from Mike contained
> the following:
>
> >Works like a charm. It was that double $$ that I could not wrap my
> >head around. Thanks very much!
>
> Ah, variable variables. Yep they are fun. :-)
|