in reply to Re: problems returning from recursive subroutine (file::find instead)
in thread problems returning from recursive subroutine
Funny ;D On some FSs, -e 'foo' == -e 'Foo', so you should take that out. Besides, it's redundant on FSs that are case sensitive.rename $_, $new unless -e $new;
update: heh, here's a different approach then
use File::Find; @ARGV ||= '.'; find( { preprocess => \&pp }, @ARGV ); sub pp { for(@_){ my $new = lc $_; next if $new eq $_; unless(-e $new){ rename $_, $new; $_ = $new; } } return @_; }
|
MJD says you can't just make shit up and expect the computer to know what you mean, retardo! I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests. ** The Third rule of perl club is a statement of fact: pod is sexy. |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: problems returning from recursive subroutine
by Abigail-II (Bishop) on Apr 18, 2003 at 12:13 UTC | |
|
Re^3: problems returning from recursive subroutine (needs some work)
by Aristotle (Chancellor) on Apr 18, 2003 at 16:52 UTC |