Gossamer Forum
Home : General : Perl Programming :

declaring variable

Quote Reply
declaring variable
In perl, how do I declar a variable so that its name is the value of another variable?

I.E.

my $name = "test";

I would like to declare a variable $test automatically.

I would think this would work but it doesn't:

my $$name = "successfully printed test variable";

print $test;

Please help... thanks,

- Jonathan
Subject Author Views Date
Thread declaring variable jdgamble 10189 Aug 29, 2004, 10:12 AM
Thread Re: [jdgamble] declaring variable
TheSafePick 10033 Sep 2, 2004, 7:32 AM
Thread Re: [TheSafePick] declaring variable
jdgamble 10013 Sep 2, 2004, 7:56 AM
Post Re: [jdgamble] declaring variable
Chaz 9991 Sep 2, 2004, 7:24 PM
Thread Re: [jdgamble] declaring variable
Chaz 10027 Sep 2, 2004, 7:54 PM
Thread Re: [Chaz] declaring variable
jdgamble 10037 Sep 3, 2004, 10:36 AM
Thread Re: [jdgamble] declaring variable
Chaz 9999 Sep 3, 2004, 11:05 AM
Thread Re: [Chaz] declaring variable
jdgamble 10052 Sep 3, 2004, 4:08 PM
Post Re: [jdgamble] declaring variable
Chaz 9932 Sep 3, 2004, 4:56 PM
Thread Re: [jdgamble] declaring variable
fuzzy logic 9976 Sep 3, 2004, 5:25 PM
Thread Re: [fuzzy logic] declaring variable
jdgamble 9955 Sep 4, 2004, 1:58 AM
Thread Re: [jdgamble] declaring variable
fuzzy logic 9940 Sep 4, 2004, 1:25 PM
Post Re: [fuzzy logic] declaring variable
jdgamble 9906 Sep 5, 2004, 4:06 AM