in reply to help with sleep()

If you read How do I post a question effectively?, you'll see a strong emphasis on "show us what you've done". Part of it is because we don't like just doing people's work for them and part is so we have a better idea of what your difficulties might be.

You seem to have a rough idea for your algorithm, so I'll translate what you've written into code - remember, of course, that there's more than one way to do it. See sleep and perlop for details on code elements.

foreach my $i (0 .. 600) { print $i; if ($i % 4 == 3) { sleep(5); } }