in reply to Deleting Files on NT

Check to make sure the infomation your passing to unlink is correct by putting it in a var first then printing it before you call unlink. This will at least show if you actually do have the correct file and full path. It's hard to tell what the problem is without having the actual error.

As far as finding the date of the file use stat.
my $time = (stat($filename))[8];
I'm not sure what time you'll be sorting by so you may have to use 9 or 10. Also, there is much more info you can get from stat, check out the docs