in reply to Re^2: on the fly reference to subroutine output
in thread on the fly reference to subroutine output
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: on the fly reference to subroutine output
by thirdm (Sexton) on Mar 05, 2013 at 05:28 UTC |
In Section
Seekers of Perl Wisdom