use strict; use File::Find; $path = '.'; find(\&pattern, $path); sub pattern { print "$_\n"; rename($_, lc($_)); }