MMGM has asked for the wisdom of the Perl Monks concerning the following question:
At this point, $USERNAME is still "my_name" and $PARM1 appears to be the scalar address. How can I get $USERNAME to be "other_user" without explicitly referencing $USERNAME? How do I appropriately setup that level of indirection? Thanks, -Michael$USERNAME = "my_name"; #init some vars $PARM1 = '$USERNAME'; $PARM2 = "other_user"; $PARM1 = \$PARM2; #$$PARM1 now is "other_user"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: Changing variables be reference
by jeffa (Bishop) on Mar 07, 2001 at 00:17 UTC | |
|
Re: Changing variables be reference
by redcloud (Parson) on Mar 07, 2001 at 00:22 UTC |