http://www.perlmonks.org?node_id=291235


in reply to Re: Re: Reasons for looking at your favourite module's source
in thread Reasons for looking at your favourite module's source

Let the code describe what is being done and comments simply to describe why.....

# the sort on length means we will delete # dir/subdir/subdir/ before dir/subdir/ and dir/ # which avoids a directory not empty error for my $dir ( sort { length $b <=> length $a } @$dirs ) { rmdir "$DOC_DIR/$cwd/$dir" or $errors .= "Failed to delete $cw +d/$dir: $! "; }

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print