First of all, I'd like to thank everyone for their help on this topic - I think I came out of it with exactly what I was looking for. Using a solution presented by Sifmole, I was able to use HTML::Template to separate my Perl script from my HTML and make a (I believe) much more maintainable script. This is what I ended up with: