PBP 102: Fixed-width Data

The PBP suggests we use unpack to take apart fixed-width data.

That’s a fine suggestion.  When done right, it makes fixed width as clear as possible.  Go for it.

The choice is ‘unpack’ versus ‘regexes’.  Regexes have the potential to have more errors and are not as fast as unpack; unpack is really fast.


Leave a Reply