Used perltidy
Removed unused sub getContent().
Switched to Readonly to remove barewords.
Fixed return undef;
3 argument open instead of 2.
Made the script more module like for testing purposes.