a find script

I wrote this find script for all those questions about 'files created in the last three hours' and 'files created more than 2 minutes ago'. This script *will* recurse into subdirectories.
As always, please suggest/make changes as you see fit.

#!/usr/bin/ksh
#set -x                 # unhash for debugging

print_help(){
        echo "Usage: find.sh <num><h|m> dir_to_search_in <older|newer>"
        echo "example:
        find.sh 3m /tmp newer
this will search in /tmp for files created in the last 3 minutes.
        find.sh 3h /tmp older
this will search in /tmp for files older than 3 hours."
}

PERLDIR=/opt/perl/bin # you can specify the path of your perl binary here
if [ $# -ne 3 ]; then
        print_help
        exit -2
fi
ARG1=$1
ARG2=$2
ARG3=$3

case "$ARG3" in
        "newer") new_val="-newer";;
        "older") new_val="! -newer";;
        *) print_help; exit -2;;
esac
unit=`$PERLDIR/perl -w -e 'print chop $ARGV[0]' $ARG1`
diff=`$PERLDIR/perl -w -e 'print substr $ARGV[0],0,-1' $ARG1`
case $unit in
        h) mult=3600;;
        m) mult=60;;
        *) print_help; echo "PLEASE NOTE: Only hour or minute granularity supported. For coarser stuff, use regular find. Finer granularity not yet supported."; exit -1;;
esac
diff_sec=$(($diff*$mult))
then_time=`$PERLDIR/perl -w -e '@mytime=localtime (time - $ARGV[0]); printf "%d%.2d%.2d%.2d%.2d", $mytime[5]+1900,$mytime[4]+1,$mytime[3],$mytime[2],$mytime[1];
' $diff_sec`

touch -m ${then_time} $ARG2/file_for_find
find $ARG2 -type f $new_val $ARG2/file_for_find
rm $ARG2/file_for_find
exit

--EDIT--
This has been tested on a HPUX 11.11 system. All utilities are HPUX standard.
--EDIT--

I've posted a perl snippet about 5/6 times as well. It finds file times down to the second.

In production we use a little ditty in C that does math arithmetic based on seconds, then stats thru files looking for older/younger files. I posted part of that thing as well.
The problem is not that we haven't posted useful code, like yours, it's that the posters almost never do a search, or if they do a search they use 'file creation date' or some other non-sequitur term that probably won't find anything useful.

The find article in our FAQ section mentions the touch/find trick but many users can't even be bothered to scan the FAQ section prior to asking a question. I will link this thread in the FAQ article as well. It will help those users who do read the FAQ's.

I found that it didn't work.

I had to make a small change to the touch line to add "-t" before the time variable.

i.e.

touch -m -t ${then_time} $ARG2/file_for_find

then it worked.