Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Does die() change the order of execution?

by jwest (Friar)
on Nov 01, 2001 at 21:53 UTC ( #122610=note: print w/ replies, xml ) Need Help??

in reply to Does die() change the order of execution?

What you're seeing is an illusion. Since you're looking at STDOUT (the target of print) and STDERR (the target of die) at the same time, it looks like that's the order it's executing in. In all actuality, it's happening in the order you expect, but the buffers are being flushed in the "wrong" order, creating the discrepancy.

Hope this helps!


-><- -><- -><- -><- -><-
All things are Perfect
    To every last Flaw
    And bound in accord
         With Eris's Law
 - HBT; The Book of Advice, 1:7

Comment on Re: Does die() change the order of execution?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://122610]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2015-07-28 10:53 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (254 votes), past polls