in reply to How to define a list of regular expressions?
Use of uninitialized value $regex
My guess: In your code you initially have @files > @regexes.