in reply to A script that does an action every 5 minutes

Put your action in a loop and include this statement: sleep(300) as part of the loop.
So your overall code might look like:
while(condition){ ## code here if(exit condition){ ## code here }else{ sleep(300); } }
At least this is what I am assuming from your question.

TStanley
--------
There's an infinite number of monkeys outside who want to talk to us
about this script for Hamlet they've worked out
-- Douglas Adams/Hitchhiker's Guide to the Galaxy

Replies are listed 'Best First'.
(ar0n: until) Re (2): A script that does an action every 5 minutes
by ar0n (Priest) on May 26, 2001 at 02:58 UTC
    I like until for doing that:
    until ( $to_sleep_perchance_to_dream ) { print scalar localtime, "\n"; sleep 300; }

    ar0n ]