|
|
| Keep It Simple, Stupid | |
| PerlMonks |
Re: Stupid mistakes I repeatedly makeby Corion (Pope) |
| on Mar 27, 2005 at 17:07 UTC ( #442646=note: print w/ replies, xml ) | Need Help?? |
|
I some times fall for the my ($self, $bar, $baz) = shift; bug, but there is another bug that catches me, especially when I start to consciously think about it instead of letting my fingers interpret my commands:
Of course, this is the reversed regex operator (which doesn't exist), and Perl sees this as a syntax error. ambrus taught me a good mnenonic - the negated comparison for the regex binding operator is !~, which has the same order as !=, and thus, the regex binding operator must be =~. In a certain way this confusion when thinking about what my fingers should be doing reminds me of the problem that octopodes have when coordinating their arms, which, seemingly, they never do - they just send commands to them and then verify the behaviour by optical inspection.
In Section
Meditations
|
|
||||||||||||||||||||||||||||