OK well here are some things you can try:
-
Are you sure you have the right directory in $file_path? File::Basename explicitly states that dirname does not always give the proper director, and that fileparse should be used instead.
-
Are you sure the file glob is working? Does the @files array actually contain the files you are expecting?
-
Are you sure you aren't just forgetting to use the $category at the appropriate time like I stated in my last post? I don't see anywhere in your code that you actually use $category, and so after exiting the loop you only have the last assigned value.
| [reply] [d/l] [select] |