1# Used to test Process.pm 2use Time::HiRes qw(sleep); 3 4my $delay = 0.01; 5 6$| = 1; 7 8my @parts = ( 9 "1.", 10 ".5\n", 11 "ok 1 00000\n", 12 "ok 2\nnot", 13 " ok 3", 14 "\nok 4\nok ", 15 "5 00000", 16 "" 17); 18 19my $delay_at = shift || 0; 20 21while (@parts) { 22 sleep $delay if ( $delay_at & 1 ); 23 $delay_at >>= 1; 24 print shift @parts; 25} 26sleep $delay if ( $delay_at & 1 ); 27