in reply to Assign a reference to a non reference
References are "normal" variables:
sub foo { return ({},[]); } my ($baz, $bar); ($baz,$bar) = &foo(); print ref $baz," ",ref $bar,"\n";
\%hash is a reference, but you can't do \%hash = $ref because \%hash is a constant.
assign references into named non-reference vars
%hash = %$baz; @array = @$bar;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Assign a reference to a non reference
by Anonymous Monk on Oct 03, 2002 at 13:30 UTC | |
by grinder (Bishop) on Oct 03, 2002 at 14:02 UTC |