in reply to Alternatives to Mixing Alarm and Sleep

Perhaps you could use select?

alarm 10; while ( ! $done ) { $done = is_it_done_yet(); select undef, undef, undef, 1.0; }

I hope this is helpful.

Cheers,

JohnGG