On 4/1/2004 11:39 PM, Richard Heintze wrote:

I'm trying to index into some function parameters that
are passed as array references.

Is strategy #1 (see below) identical to strategy #2? I
thought so. I had a bug I that I fixed  by recoding
strategy #1 as strategy #2 and it fixed the problem.

This leads me to believe they are not identical. What
is the difference?

  Thanks,
       Siegfried

sub f {
  my ($y) = @_;

  # strategy #1
  print $$y[0];

  # strategy #2
  print $y->[0];
}
my @x = (1,3,3,45);
&f([EMAIL PROTECTED]);

What problem? I get the result:


=> 11

which is what I expect. Both statements are equivalent.

Randy.



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to