Author Archive

PBP: 063 If Blocks

Monday, December 8th, 2014

The first entry in the “Control Structures” group regards the humble if statement.  Perl being perl, the if statement is more complex than it looks, and the Best Practices casually state, “… always use the block form of if.” (more…)

PBP: 062 Slice Factoring

Thursday, December 4th, 2014

The Best Practices suggest extracting key or index lists out of large slices and using hashes to manage them. (more…)

PBP: 061 Slice Layout

Tuesday, December 2nd, 2014

Our favorite reference suggests that working with slices is easier when those items are aligned in columns.  Sometimes. (more…)

PBP: 060 Slicing

Monday, November 24th, 2014

Everyone’s favorite set of Perl guideliens tells is not to forget about the awesome power of array slices!  That’s smart, too. (more…)

PBP: 059 Array Indices

Thursday, November 20th, 2014

The PBP reminds us that we can use negative indexes to access arrays in reverse, instead of having to do calculations for it.  It suggests several useful reasons, including readability and getting the interpreter to complain in some cases instead of silently doing the wrong thing.  I don’t feel that strongly about this suggestion, but do follow it. (more…)

PBP: 058 Dollar-Underscore

Monday, November 17th, 2014

Mr. Conway suggests that you be wary of any modification to $_.  Personally, I take it further than that, and try never to use the thing at all. (more…)

PBP: 057 Match Variables

Thursday, November 13th, 2014

Lots of people (not just the Best Practices) tell you never to use the regex match variables.  Listen to them! (more…)

PBP: 056 Localizing Punctuation Variables

Monday, November 10th, 2014

The PBP suggests using local on any changes to one of the global punctuation variables.

(more…)

PBP: 055 Punctuation Variables

Thursday, November 6th, 2014

The Best Practice is to ‘use English’ for the uncommon punctuation variables.  This has been a hard thing for me to get used to, but I have found it useful. (more…)

PBP: 054 Initialization

Monday, November 3rd, 2014

Mr. Conway suggests that you initialize any variable you localize. (more…)