in reply to Variable name

$foo="foo"; $bar="f"; print ${$bar."oo"}, "\n";

Not certain what your issue is. Perhaps the output is being overwritten by your prompt. Try ending the print with a newline.

--MidLifeXis

Replies are listed 'Best First'.
Re^2: Variable name
by MidLifeXis (Monsignor) on Dec 08, 2008 at 15:28 UTC
    perl -v This is perl, v5.8.8 built for PA-RISC2.0

    What version of perl are you using?

    Also, is this part of a larger script (perhaps including use strict; use warnings;), or have you tried running this snippet as a standalone script?

    --MidLifeXis

Re^2: Variable name
by nsteiner (Novice) on Dec 08, 2008 at 15:02 UTC
    Nope, still doesn't work. I am getting a 'Use of uninitialized value in print' Maybe something else I am forgetting ?