Fix a warning in newer perls

Also included a commit that removes a couple unneeded lines