I'm using File::Util's list_dir to get an arrary of file names. For the --pattern, I need to pass it the file name and get a list of all files (including extensions) EXCEPT .txt files.
For example, I have a directory with the following files:
I want to pass it the base name xyzJUN2009-1 and have it return:
This is my first regex attempt. I've got xyzJUN2009-1(?!\.txt) which will exclude txt files, but doesn't return xyvJUN2009-1.csv (only the base name xyzJUN2009-1). And, for safety's sake, it should be case-insensitive.