Hi All,

Wondering if someone can give me a shortcut for the following..

I'm passing a few variables into a function, and I want to be hip so I send
them in as references..

my_function (\$var_1, \$var_2);

Now, within the function, can I dereference them immediately?  I've
assigning them to intermediate scalars first, which works, but I want to cut
out the middle man..

works:

--
sub my_function {

my $var_1_ref=$_[0];
my $var_2_ref=$_[1];

print "var 1 is $$var_1 and 2 is $$var_2";
--

I want to be able to do something like..

--
print "var 1 is $$_[0] and 2 is $$_[1]";
--

This doesn't work, but you get the idea...

Any ideas?

Thanks,

Mark

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to