Just create a file in your cgi-bin directory under public_html, and place the Perl "shebang" line (#!/usr/bin/perl) on the first line of the file. Below this line you may write Perl code. Make sure you make this file's CHMOD permissions 755, and output a Content-type header before anything else.