in reply to Monitoring file names for changes in extension
Like, ummm... what have you tried and failed?
Consider this option:
Use the opendir/readir combination to read the direcotry you are monitoring and do a pattern match on the tilde at the end of the file name and react accordingly.# # handwaving enabled opendir(MYDIR,"/path/to/where/I/want/to/monitor") or die $!; while(my $fname=readdir(DIR)){ next unless $fname =~ m@.*\~$/ | react here... |
Now that I've shown you my code... show me yours!
|
|---|