raj_55555 has asked for the wisdom of the Perl Monks concerning the following question:
Output: ARRAY<0X37ce48>Array<0X4eaaa0>use warnings; use strict; sub testfunc(); { my $temp2=testfunc(); my @arr=@$temp2; print @arr, $temp2," \n" ; #want @arr to print the array elements & $temp2 to print ref value } sub testfunc() { my @temps= [1,2,3]; return \@temps; }
Expected Output: 123Array<0X4eaaa0>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why isn't the obvious dereferencing of the array working?
by toolic (Bishop) on Apr 29, 2015 at 18:05 UTC | |
|
Re: Why isn't the obvious dereferencing of the array working?
by AnomalousMonk (Archbishop) on Apr 29, 2015 at 18:13 UTC | |
|
Re: Why isn't the obvious dereferencing of the array working?
by Laurent_R (Canon) on Apr 29, 2015 at 19:11 UTC |