Yes. Inside of your ~/public_html directory you can create a cgi-bin directory.

mkdir ~/public_html/cgi-bin/

Inside of that directory you can have executable shell scripts ending with a .pl and .cgi file extension. Example scripts can be found in PERL and in Bourne Shell. After writing your script you need to make it executable.

chmod a+x myperlscript.pl

Please debug all of your scripts from the command line before running them through the webserver.

./myperlscript.pl

I try to view my webpage but get the following error:

Forbidden
"You don't have permission to access /~myuserid/ on this server."
This could be caused by a few things. Try each of the solutions below in order.

Your home directory isn't world readable/executable(necessary for
your webpage to be accessible). To fix this enter the shell command:

chmod 755 ~/

Your public_html directory in your home directory isn't world
readable/executable. This can be fixed with the shell command:

chmod 755 ~/public_html

There is no index.php or index.html file in your public_html
directory. If you have another file you'd like to use as your home page
you can enter the shell command:

ln -s home.html index.html

and your data should become available. Otherwise create a
~/public_html/index.html file and put some text in it.

bash: ./myscript.pl: bad interpreter: No such file or directory

If your script was written in windows it could be a carraige return/linefeed problem. try the following command

perl -p -i -e 's/\r//' myscript.pl

It won't modify any visible characters in your script.

If the above solution doesn't work, the path to the perl interpreter is probably bad. Your script header should always have #!/usr/bin/perl at the beginning. See the example in PERL.