in reply to What did you have to Unlearn

I had to unlearn a pattern of thinking that put conditionals first. Code like
if ( $DEBUG ) { print "debug info\n"; }
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;