in reply to Monitoring file names for changes in extension
Depending on your platform I'd suggest Linux::Inotify2 or maybe Linux::Inotify, which allows you to monitor files and directories for changes and react on them without being forced to check everything yourself from time to time.