A couple of troubleshooting ideas:
1. Make sure you can run the script from the command line: Terminal into your server and execute the script (e.g. at command prompt, input perl yourscriptname). In the case of the example you listed above, you should see the following displayed:
Content-Type: text/html
[newline]
[newline]
Test
2. Make sure you have set the ibay to allow "execution of dynamic content" (i.e., cgi scripts). You'll find this option in the server-manager information bays panel, under the modify link. I believe SME defaults to setting this option at diabled.
3. Double check that your perl script has the path to perl "shebang" at the top of your script. It should be #!/usr/bin/perl
4. Make sure the file extension for your script are either .pl or .cgi.
5. Check your file permissions. They should read identical to this example:
[root@server cgi-bin]# ll formmail.pl
-rwxr-x--x 1 admin shared 26516 Aug 23 13:42 formmail.pl
[root@server cgi-bin]#
6. Attempt to execute the script from your web browser by inputting the URL:
www.yourdomain.com/ibayname/cgi-bin/scriptname.plIf none of this works, then I'm guessing you have a system configuration issue.
Greg