I managed to sort it myself.
As I was using the server provided by my university I had no access to install the required module (HTML::Entities).
I decided to then set up the required module on my own Apache web server on a virtual machine and managed to get it working this way after sorting out some syntax/spelling errors.
The way I installed the HTML::Entities module was through the synaptic package manager, just by searching libhtml-parser-perl the module was found and installed. I restarted Apache and the VM just in case that was required.
Thanks for everybody's input!
apt install libhtml-parser-perl