We don't bite newbies here... much | |
PerlMonks |
Re^2: inline caching a list-generating subby Roy Johnson (Monsignor) |
on Aug 19, 2005 at 14:36 UTC ( [id://485160]=note: print w/replies, xml ) | Need Help?? |
Nicely written, but you're having it return a ref in scalar context, whereas the OP wanted it to behave like a list (which returns the last element). Change the last $list to $list->[-1]
Caution: Contents may have been coded under pressure.
In Section
Seekers of Perl Wisdom
|
|