in reply to Re^3: The print is output later after die
in thread The print is output later after die

There's a difference. $| = 1; is equivalent to select()->autoflush(), not STDOUT->autoflush().