use File::Find; push @ARGV, '.' unless @ARGV; finddepth(sub { my $new = lc; return if $new eq $_; rename $_, $new unless -e $new; }, @ARGV);