http://qs321.pair.com?node_id=216671


in reply to Re(4): My coding guidelines
in thread My coding guidelines

print "$pattern not found in $file\n" unless $found;
I use unless when I expect that the print will be executed most of the time - unless the condition happens to be true. In the quoted case, I'd probably use if not, as the if highlights the fact that the message is only printed if the pattern wasn't found. Just like the way you use "if" and "unless" in English.

Makeshifts last the longest.