Wednesday, October 21, 2015

Wednesday: I am starting this post at work so I remember to discuss why never to use ($x =~ /string/) when ($x eq 'string') is correct.

The main reason is that later, when you add "stageX_bonus_stuff", it doesn't get matched to the old "stage_X" cases.  While we're on the topic:  there's a reason there's an "else if" or "elsif" conditional.  If you simply string a bunch of "if" statements after each other, you can potentially have multiple matches, resulting in similar kinds of bugs.

Today's "Let's pretend I Drawlloweened": "8-bit zombie."  Whatever.  This is a legitimate 8-bit zombie from this game.


No comments:

Post a Comment