in reply to
behaviour of STDOUT and STDERR
You're
Suffering from buffering
. Put this before print():
$| = 1; # disable buffering STDOUT
[download]
Comment on
Re: behaviour of STDOUT and STDERR
Download
Code
In Section
Seekers of Perl Wisdom