in reply to problems returning from recursive subroutine
Using finddepth rather than find is important because directories will otherwise be renamed before File::Find (at that point futily) attempts to recurse into them.use File::Find; push @ARGV, '.' unless @ARGV; finddepth(sub { my $new = lc; return if $new eq $_; rename $_, $new unless -e $new; }, @ARGV);
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: problems returning from recursive subroutine
by PodMaster (Abbot) on Apr 18, 2003 at 12:09 UTC | |
by Abigail-II (Bishop) on Apr 18, 2003 at 12:13 UTC | |
by Aristotle (Chancellor) on Apr 18, 2003 at 16:52 UTC |