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. |
In reply to Re: Re: problems returning from recursive subroutine
by PodMaster
in thread problems returning from recursive subroutine
by melguin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |