in reply to Kill a script at a certain time

Why not use alarm ?
SIG{ALRM} = /&exit; alarm(7*60*60);

this should send an ALRM SIG and exit your application after 25200 seconds, or at 4pm, aka 16:00 ;-)

-----------------------------------
--the good, the bad and the physi--
-----------------------------------