in reply to Problem with MacPerl

I know nothing about Macs, but perhaps replacing sleep() calls with something like:
sub mysleep { select(undef,undef,undef,$_[0]); }
would change the underlying call to something friendlier to the cooperative multitasking ?