Beefy Boxes and Bandwidth Generously Provided by pair Networks chromatic writing perl on a camel
Syntactic Confectionery Delight
 
PerlMonks  

Re: context-sensitivity for selfwritten functions

by rob_au (Abbot)
on Jan 28, 2004 at 04:06 UTC ( [id://324625]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to context-sensitivity for selfwritten functions

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'"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://324625]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.