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?
Things to note:#!/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"; } } }
–hsm
"Never try to teach a pig to sing…it wastes your time and it annoys the pig."
|
---|