N
Nikita Synytskyy
Hello all!
Consider the following simple Perl program:
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print "starting up...\n";
for ($i = 0; $i < 5; $i ++)
{
print "loop start ... ";
for ($j = 0; $j<3000000; $j++)
{ $useless = $j; }
print "loop end.\n";
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When I run this, I would expect the following: first, "starting up..."
printed; immideately afterwards, "loop start", then a long pause, and
then "loop end.". And so on, five times.
What I get instead is: "starting up...", long pause, then "loop start"
and "loop end" immideately following each other, then another long
pause, and so on.
Why does it happen this way?...
Nikita.
Consider the following simple Perl program:
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print "starting up...\n";
for ($i = 0; $i < 5; $i ++)
{
print "loop start ... ";
for ($j = 0; $j<3000000; $j++)
{ $useless = $j; }
print "loop end.\n";
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When I run this, I would expect the following: first, "starting up..."
printed; immideately afterwards, "loop start", then a long pause, and
then "loop end.". And so on, five times.
What I get instead is: "starting up...", long pause, then "loop start"
and "loop end" immideately following each other, then another long
pause, and so on.
Why does it happen this way?...
Nikita.