in reply to Finding local vs Global Error

You declare a lexical hash, %index in process_files(), but when you use it you treat it as a scalar hash reference, $index. That's a new undeclared variable to perl.

Your editor can probably find the missing bracket. You'll be helped in that if you fix your indentation to something consistent.

I don't see the constant in void context right away, but you probably will if you check line numbers accurately.

After Compline,
Zaxo