P
phynkel
Application: web
Background: The web page gets a string from the user and it's passed to
PERL. PERL runs a UNIX find command to find files with that string.
Then there's a lot of processing before the results are returned to the
user.
Problem: The user wants a web page option that will allow them to set
the "latest" possible date of the files that can be searched.
My idea: Get date string from user input. Use that string in a PERL
system command to "touch" a file with that date. Something like
system 'touch --date $lastdate /tmp/touchfile';
Then the PERL system command running the find will look for files
older than "/tmp/touchfile".
I'm looking for a simpler and/or cleaner way to do things. Any
thoughts?
I don't want to make more than one pass of the files, so I want to get
everything I can out of the find command as it does some other inline
processing before getting back to PERL
TX
Background: The web page gets a string from the user and it's passed to
PERL. PERL runs a UNIX find command to find files with that string.
Then there's a lot of processing before the results are returned to the
user.
Problem: The user wants a web page option that will allow them to set
the "latest" possible date of the files that can be searched.
My idea: Get date string from user input. Use that string in a PERL
system command to "touch" a file with that date. Something like
system 'touch --date $lastdate /tmp/touchfile';
Then the PERL system command running the find will look for files
older than "/tmp/touchfile".
I'm looking for a simpler and/or cleaner way to do things. Any
thoughts?
I don't want to make more than one pass of the files, so I want to get
everything I can out of the find command as it does some other inline
processing before getting back to PERL
TX