If we are to take you at your word that this is not homework, then the stricture that you are not allowed to use any modules makes no sense. The purpose, and the power, of Perl, is to leverage what someone else has already done. You have received excellent suggestions, and you should, I think, go to your manager and explain to him or her that the most expeditious way to solve the problem is to use one of these packages. (When you want to install a new door in your house, you do not begin by cutting down a tree with an axe ...)
Remember that packages can be installed locally, even on a per-application basis, without disrupting anything else that is installed. This is discussed in topics that include non-root user in their titles here, because it is an issue that is constantly dealt with when installing software on a shared-hosting web server.