Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: Context propagation into subs and evals

by LanX (Bishop)
on Feb 20, 2012 at 14:22 UTC ( #955078=note: print w/replies, xml ) Need Help??

in reply to Re: Context propagation into subs and evals
in thread Context propagation into subs and evals

I think you are defining the term "context" differently.

It might be used like this when discussing variable pads and closures...(?)

...but that's not my point.

Please see the definition in perlglossary to understand my interpretation:

     The surroundings, or environment.  The context given by the
     surrounding code determines what kind of data a particular
     "expression" is expected to return.  The three primary contexts are
     "list context", "scalar context", and "void context".  Scalar
     context is sometimes subdivided into "Boolean context", "numeric
     context", "string context", and "void context".  Thereís also a
     "donít care" scalar context (which is dealt with in Programming
     Perl, Third Edition, Chapter 2, "Bits and Pieces" if you care).

UPDATE: see also wantarray

Cheers Rolf

  • Comment on Re^2: Context propagation into subs and evals

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://955078]
[shmem]: just one proverb before dozing off: when dealing with a bear, hubris is suicidal
[shmem]: Old_Gray_Bear would nod, and go back to sleep, then - but he's been sleeping for a year now.
[erix]: "AngloZionist Empire"? "Stop the Empire's war on Russia?" WTF?
erix stops reading as recommended by the blog itself
[erix]: my attention being jealously guarded ;)
[shmem]: erix, yes, it's a WTF. Since...
[erix]: antisemitic && (pro-)russian. Makes sense :P

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2018-03-19 20:51 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (246 votes). Check out past polls.