Converting past date to seconds

Need a little help developing a ksh script. Have read through Perderabo's datecalc routine and it does not seem to fit the function I am looking for. Basically what I am trying to do is find any file (in a specific directory) that was created within the last five minutes. I am not a programming expert but do have a lot of background. Need a Korn shell example or a Perl example that I can call from ksh. Not a Perl programmer, but can understand the basics.

I am a simple guy and like to keep things simple. What I am currently using is to get the current date in seconds and then subtracting 5 minutes.

SECONDS=`date +%s`
FIVEMINSAGO=`expr $SECONDS - 300`

Now what I need is to convert the datestamp of my files to seconds as well. My file is the cut command from an ls -ltr. See example:
Mar 25 11:35 1658.wulog
Mar 25 12:08 1659.wulog
Mar 25 12:29 1660.wulog
Mar 25 12:38 1661.wulog
Mar 25 15:39 1662.wulog

If I can get the date and time converted to seconds, then all I need to do is see if that conversion is greater than $FIVEMINSAGO. That is the easy part. What I am not sure about is how to easily convert the date/timestamps in the example above. Any slick (easy) solution would be greatly appreciated.

This will bring you right to the seconds:

> stat -c %Z myfile
1238445913

or, more precisely, seconds since Epoch of last change.
%Y is for last modification
%X is for last access

From any of these, you can compare to the current time (or time minus 300 seconds), to see if a file meets the requirements.

Not sure what stat is. I am on AIX 5.3 and it does not find stat. I see the stat function in Wikipedia. Not sure why AIX 5.3 does not seem to use it. Any ideas? Perhaps it is part of a utility that is not installed? Found istat, however there are no options to convert to seconds. Your solution is great, however I need an AIX 5.3 compatible solution.

Found what I needed. Apparently there is a -mmin in the find command that will find files that have been changed any number of minutes in the past. This looks like it will work. Thanks for the suggestion.