The print, sleep, print is occuring when you expect it too. However, output is buffered -- meaning that what get sent to output get held until the buffer gets flushed.
The $| = 1; line tells Perl to shut off its buffering; So everything that gets printed goes out immediately.
In reply to Re: print sleep print
by Sifmole
in thread print sleep print
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |