C
Chet Butcher
Hi
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.
Thanks
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.
Thanks