in reply to What did you have to Unlearn
use to fly off of my fingertips without much thought. It took a while to try writing print "debug info\n" if $DEBUG; Once I saw that this could lead to less cluttered, easier-to-read code, the change was easy. Using "unless" took a while longer, since I balked at the built-in negation. I use it sparingly, for things like unlink $file or die "$file: $!" unless $DEBUG;if ( $DEBUG ) { print "debug info\n"; }
|
|---|