in reply to Re: users online script not accurate
in thread users online script not accurate

Agreed.

In Oracle the current date/time is sysdate which is day based

delete from table where dateattr < sysdate - 1;


In systems like Oracle I'd probably use stored procedures and get Oracle to fire it off automatically. If there is other processing then you may need to call it via perl.

Also don't forget to COMMIT if required.
DBI can autocommit and some systems will also commit on disconnect but it's better practice to do it yourself. That way you have control.