in reply to Converting files and links to lowercase

Watch you precedence -> if ($_ ne "." && lc() ne $_).

This may be your problem (if not it is more clearly written as):.

 if (($_ ne ".") && (lc() ne $_)).

or even better:.

if ($_ ne "." and lc() ne $_).

If would also move the directory check to a guard clause.. (which you are only checking for current dir and not the parent (..))

if (lc() ne $_) { next if m#^\.|\.\.$#;


Update: cLive ;-) has some great advice about using modules

grep
grep> chown linux:users /world

Replies are listed 'Best First'.
Re: Re: Converting files and links to lowercase
by Anonymous Monk on Jan 31, 2002 at 01:12 UTC

    Thanks for the tip. Will do.

    Hadley