I want to remove millions of files in a directory and pages mentioned that the following Perl code is the fastest:

```
perl -e 'chdir "BADnew" or die; opendir D, "."; while ($n = readdir D) { unlink $n }`

```

However, is it also possible to do this on only files containing the word 'sorted'? Does anyone know how to rewrite this?