in reply to deterministic fork

Greetings.

While my honorable brethren are of course totally right, I'd also like to point out that for the sole purpose of getting the example to work according to your expectations you might take advantage of the line buffering behavior of standard output and just print your stuff in one line. Then turn off buffering/change output device and everything goes southwest again.

The moral is that if you want serial access to a shared resource - this is the general problem you are after - you either:

Cheers,
alf

Replies are listed 'Best First'.
Re: Re: deterministic fork
by falcon (Initiate) on Oct 20, 2001 at 07:18 UTC
    Dear Monks
    Just want to show my gratitude to all of you who have replied to my question. Thank you for the detailed and expert explanation, aswell as for the sugestions ( strict ; ).

    I have learned a lot and in this example.This site is by far the best Perl - and good programming style - resource I have seen.

    Best regards,
    falcon.