Perl: the Markov chain saw | |
PerlMonks |
Cleaning up by ageby brianarn (Chaplain) |
on Nov 12, 2001 at 23:50 UTC ( [id://124898]=perlquestion: print w/replies, xml ) | Need Help?? |
brianarn has asked for the wisdom of the Perl Monks concerning the following question:
Got a question that I'm having some difficulty finding - it's probably something I've missed somewhere, but I'm still essentially a newbie to Perl, so be gentle. ;) I'm writing up a script that allows for my group to archive our shift status at the end of each shift. My manager insists on just archiving an M$ Word doc instead of letting me write up something more dynamic (which I've done before using server-parsed TCL). My script accepts the file properly (using CGI.pm), will even warn if you are uploading a shift status that is already there and will represent the upload script but with an 'Override' field that wasn't there (set to No by default, but can be put to Yes to upload). However, I don't have direct access to the server so I can't go in and clean out files occasionally myself, and these status files can be anywhere from 100-200k, so they can fill up a directory after a month. I'm trying to write up a function that'll go through the directory handed to it and remove the 10 oldest files when called - I've tried -M and -A both, but all files return the same age. I've included some small debug statements for my own purpose, will present here. I know that if nothing else, I could just do something like: but that seems a little cheap - is there a better way to do this? ~Brian
Back to
Seekers of Perl Wisdom
|
|