in reply to Re: How to rename to lowercase every file in a directory and its subdirectories?
in thread How to rename to lowercase every file in a directory and its subdirectories?

Pretty much the idea, but you seem a little confused by variables. Lightly edited (changed to a print statement to protect my innocent file names), here is your code:
#!/usr/bin/perl use strict; use warnings; dir('.'); sub dir { opendir( DIR, shift ); my @list_of_files = readdir(DIR); foreach (@list_of_files) { if (-d $_) { dir($_) if $_ !~ /^\.\.?$/; } else { print $_," would become \L$_,\n"; } } }
Things to note:

–hsm

"Never try to teach a pig to sing…it wastes your time and it annoys the pig."
  • Comment on Re: Answer: How to rename to lowercase every file in a directory and its subdirectories?
  • Download Code