Fix preamble, whitespace & comments.
Added comments & vertical whitespace
Removed suspicious duplicate binmode statement.
Modernized open-close file handling syntax
Added handy comments
Fixed output file naming and AWOL $self.
shift() the cli args instead of in-place refs.
Renamed sub
Improved variable name
Allowed output.