On Oct 17, HENRY,MARK (HP-Roseville,ex1) said:
>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);
You really don't need to, but ok.
>print "var 1 is $$_[0] and 2 is $$_[1]";
>
>This doesn't work, but you get the idea...
That's because the $ binds to the $_, and not to the $_[0]. You want
print "var 1 is ${ $_[0] } and 2 is ${ $_[1] }";
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]