in reply to Little annoying mistakes ... of others
A pretty common logic error is forgetting to explicitly check all expected values against the variable:
use strict; use warnings; my $foo = 'boo'; if ($foo eq 'goo' || 'moo') { print "$foo\n"; }
when this is really desired:
if ($foo eq 'goo' || $foo eq 'moo') {
Obviously, this is not unique to Perl, but I do see it quite often.
In Section
Meditations