in reply to Changing variables be reference

Ah, symbolic references . . .

Are BAD!! You shouldn't use them, but since you are, here is the answer:

$USERNAME = 'my_name'; $PARM1 = 'USERNAME'; print "$$PARM1\n";
Now you can access $USERNAME via $PARM1. You really should use strict, by the way - it's like making a hyper child sit on his/her hands. :)

References are best used on lists and objects:

my $array_ref = @foo; my $hash_ref = %bar; my $obj_ref = new Foo::Bar;
so that when they get passed around, space and time are not wasted making copies. Instead, the address is passed instead of making an explicit copy. References to scalars are not very usefull.

Jeff

R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--