Thus it was written in the epistle of Brust, Corwin,
> 
> From: Ted Ashton [mailto:[EMAIL PROTECTED]]
> >> I don't particularly mind the last two - in fact they add some benefits
> >> (like not modifying the original), which are nice to have. However, that
> >> first one, frankly, drives me nuts.
> >
> >Please reread the proposal.  chomp() called in void context continues to 
> >work exactly as it does now.  None of the above need to change.  
> 
> give our code is:
> 
> for (chomp(<>)) { print }
> I'm finding this use of void context confusing.  
> 
> Normaly I would take that to mean that the caller has provided a context for
> the call, however this is obvously not the case here. I beleive that for()
> calls chomp in array context.  
> 
> Even if I had used while() as my example, chomp would have had a calling
> context.
> 
> Would someone be kind enought to explain 'void context' as used above?

But you snipped the examples of void context.  Things like:

  chomp;

and

  chomp($var);

while (chomp(<>)) { } gets magically changed (as previously described),

for(chomp(<>)) pulls in all the lines of <>, chomps each one and iterates over
the resulting list (actually, I hadn't thought about it before, but that' what
makes sense to me :-).

Ted
-- 
Ted Ashton ([EMAIL PROTECTED]), Info Sys, Southern Adventist University
          ==========================================================           
If a nonnegative quantity was so small that it is smaller than any given
one, then it certainly could not be anything but zero. To those who ask what
the infinitely small quantity in mathematics is, we answer that it is
actually zero. Hence there are not so many mysteries hidden in this concept
as they are usually believed to be. These supposed mysteries have rendered
the calculus of the infinitely small quite suspect to many people. Those
doubts that remain we shall thoroughly remove in the following pages, where
we shall explain this calculus.
                                        -- Euler, Leonhard (1707 - 1783)
          ==========================================================           
         Deep thoughts to be found at http://www.southern.edu/~ashted

Reply via email to