http://qs1969.pair.com?node_id=11149987


in reply to Re^5: Script exponentially slower as number of files to process increases
in thread Script exponentially slower as number of files to process increases

You could run the script with strace -o /tmp/trace -ff -e trace=%file script.pl to see why the file opens fail.