Run a Perl or CGI script with justhost.com

For an upcoming android app I’m writing, I needed to get a perl script running on my webhost (justhost.com). For the longest time, I couldn’t get it to work. The support is definitely lacking, but I finally got it to work.