opendir (DIR, "/home/costas/test") or die "cannot opendir dir"; foreach $file (readdir(DIR)) { rename($file, lc($file));