Needed for a timereporting perl script - Sample code to limit a ticket search to say last (day|week|month)

I am working on some perl code to generate report for and total time for all
tickets opened for a particular email domain (everything to the right of the

I have added to this to allow for current open tickets, moving the time from
the TimeWorked to the TimeEstimated field as a placeholder (didn’t want to
set up a custom field).

I actually have most of the code hacked together right now, but need some
help limiting the searches.

My idea is to take the date and generate reports for last day, week, or
month depending on arguments. My priority right now is generating last

Any one have any good examples of code they would be willing to share, in
particular the date calculation and the search (result tickets$ right?).

Not sure if I can do this with limits, or whether I must use

Also is there an easy way to display a global custom field in perl?

Thanks for any help in advance.

Ted Serreyn

Serreyn Network Services, LLC