![]() |
|
There's more than one way to do things | |
PerlMonks |
Re^3: on the fly reference to subroutine outputby Anonymous Monk |
on Mar 04, 2013 at 19:45 UTC ( [id://1021703]=note: print w/replies, xml ) | Need Help?? |
The incorrect assumption here is that sub1 is returning an array.
In perl5, subs can return scalars or lists. Since it's not returning a (scalar) reference to an array, the only option is to store the list into a (possibly anonymous) array and pass a reference into sub2 tjd
In Section
Seekers of Perl Wisdom
|
|