remove unneeded initializations
dead code
remove unused variables
use regex with split
trailing comma instead of semicolon
fix punctuation and formatting
use any instead of grep when all we're looking for is the first one
use three-arg open(), not two-arg
use strict
change foreach to map
don't warn about variable used to keep document from going out of scope