YR> Looking for a little help for taking current time (from time) and finding
YR> the time until 1 minute after midnight.

YR> I have a daemon process (perl script) that needs to die ever new day,
YR> the process should only run from 12:01 AM Today -  l 12:01 AM Tomorrow


as ever there's more than one way to do it...

there's a variable called $^T (or $BASETIME) if you use Engligh, which
is the number of seconds since the epoch when your script started, the
time() function tells you what the number of seconds past the epoch is
now.

probably the easiest thing for you to do is a simple test like:

if (time > ($^T + (60*60*24))) {
    # we want to finish
}

but you could do something clever with POSIX::strftime as well...

it depends on how exact you need to be...

hth,
daniel


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to