"be consistent" | |
PerlMonks |
Re: context-sensitivity for selfwritten functionsby rob_au (Abbot) |
on Jan 28, 2004 at 09:06 UTC ( [id://324625]=note: print w/replies, xml ) | Need Help?? |
In order to distinguish between scalar and list return contexts, take a look at the wantarray function - See perldoc -f wantarray).
This functionality has been expanded further in the Want module which provides a greater generalisation of return contexts including top level contexts such as void, scalar and list, lvalue subroutine context and referential contexts (such as scalar, hash, array, object and alike).
perl -le "print unpack'N', pack'B32', '00000000000000000000001010111000'"
In Section
Seekers of Perl Wisdom
|
|