in reply to Traversing directories recursively
By choosing a different regex delimiter and using a ? (0 or 1) quantifier you can make this line
next if ( "$dir_name/$file" =~ /\/\.$/ or "$dir_name/$file" =~ /\/\.\. +$/ );
simpler and more readable
next if "$dir_name/$file" =~ m{/\.\.?$};
Cheers,
JohnGG
In Section
Seekers of Perl Wisdom