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
In reply to Re: Re: Re: Reasons for looking at your favourite module's source
by tachyon
in thread Reasons for looking at your favourite module's source
by liz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |