$UIDholder is just a variable name. If you want a reference to it, you do this:
my $UIDholder = "some value";
my $var_ref = \$UIDholder;
print "UIDHolder: $UIDholder\n";
print "reference: $var_ref\n";
This gives the output:
UIDholder: some value
reference: SCALAR(0x8160e8c)
Note that the memory location of your reference may be different from mine. SCALAR indicates the type of variable the reference points to.
To use the reference, you have to 'dereference' it. For instance, to print the actual value the variable holds by using the reference instead of the variable name, throw an extra $ sign in front of the $var_ref variable name:
print "Actual value of variable: $$var_ref\n";
I hope this helps.
"Peace, love, and Perl...well, okay, mostly just Perl!" --me
Apprentice
|