in reply to Re: How to compare User Input to a file Name
in thread How to compare User Input to a file Name

Is there a more effective way to use the rmtree to delete multiple directories other than using a while loop
I'm a little confused by your question. Are you trying to remove directories, or just some files within a directory? If you are just trying to remove individual files that match the specified input pattern, you probably could use rmtree from File::Path to remove your list of files. But I believe the most customary usage of rmtree is to remove directories. Here is a quote from the documentation:
the rmtree function provides a convenient way to delete an entire directory subtree from the filesystem, much like the Unix command rm -r

It is probably more appropriate in your case to use unlink. You could replace your while loop with:

unlink @found_files;