I would rethink this
# show no warnings about recursion (we know what we do ) no warnings "recursion";
You can replace that with
use File::Find::Rule;
my @jsfiles = find( file => name => qr{\.js$} => in => $searchdir );
Or even the iterator version (if you have thousands of files), example in Re^2: Write to existing file with character insert
In reply to Re^4: Hacking of JavaScript files in our corporate website
by Anonymous Monk
in thread Hacking of JavaScript files in our corporate website
by shajiindia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |