Chet Butcher <> writes:
> In the following sequence
>
> $r = {}; # a hashref
> $r = []; # an arrayref
> $r = ?; # a scalar ref
>
> What is ? ? I want to pass a ref to a scalar (pass by reference)
> without resorting to
>
> my $r;
> mySub( \$r );
>
> I just want to use
>
> my $r = (something);
> mySub( $r );
>
> to be consistent with
>
> my $r = {}; # or my $r = [];
> mySub( $r );
>
> I know it's not a big drama on the surface, but I'm trying to overload
> the method to return various results depending on the reference type,
> and I dont want the \ in some calls and not others.
Why did you redirect followups to comp.lang.c?
--
Keith Thompson (The_Other_Keith)
kst- <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"