in reply to Re: Return a Reference or Array?
in thread Return a Reference or Array?
If not, chances are that there's already a good library for it on CPAN anyway ;-)
my $ret = &my_sub(@args);
In general there's no need to add the & in front of sub calls. On the contrary it has some effects that aren't desirable most of the time, like disabling prototype checking.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Return a Reference or Array?
by morgon (Priest) on Apr 06, 2009 at 22:33 UTC | |
by CountZero (Bishop) on Apr 06, 2009 at 22:41 UTC | |
by morgon (Priest) on Apr 06, 2009 at 22:48 UTC | |
by chromatic (Archbishop) on Apr 07, 2009 at 00:01 UTC |