telcontar has asked for the wisdom of the Perl Monks concerning the following question:
The sub y is supposed to return a reference to the array returned by the sub x. However, although I get a reference, this isn't an arrayref (and it's not a coderef either).sub x { my @a = (1, 2, 3) } sub y { \&x(); } my $h = &y; print "@$h\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: return a ref to a return value (array) of another sub
by Zaxo (Archbishop) on Apr 11, 2005 at 17:23 UTC | |
|
Re: return a ref to a return value (array) of another sub
by Fletch (Bishop) on Apr 11, 2005 at 17:25 UTC | |
|
Re: return a ref to a return value (array) of another sub
by gaal (Parson) on Apr 11, 2005 at 17:27 UTC | |
|
Re: return a ref to a return value (array) of another sub
by Joost (Canon) on Apr 11, 2005 at 17:39 UTC | |
|
Re: return a ref to a return value (array) of another sub
by BrowserUk (Patriarch) on Apr 11, 2005 at 17:23 UTC | |
|
Re: return a ref to a return value (array) of another sub
by Roy Johnson (Monsignor) on Apr 11, 2005 at 17:27 UTC |