in reply to Re: Variable name
in thread Variable name

Like I said:
"Use of uninitialized value in print"

Replies are listed 'Best First'.
Re^3: Variable name
by BrowserUk (Patriarch) on Dec 08, 2008 at 15:34 UTC
    Like I said: "Use of uninitialized value in print"

    Sorry, but where exactly did you say that?

    Hi all

    I am trying to concatenate a string and a value of a variable to construct the name of a known variable.

    For example:

    $foo="foo"; $bar="f"; print ${$bar.'oo'}

    should give out: "foo" but it doesn't.

    Now, before you say anything, yes, I know, I should use a hash instead, but humor me, would you ?

    Thanks

    Noam


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      In the OP's defense, it was in response to me after you replied to their original posting. Just a race condition and small bout of carelessness on the OP's part.

      --MidLifeXis