in reply to applet to perl cgi
Since you mention "perl cgi" in the subject line, I'm going to assume you mean:
"Cause a Java Applet running in a web browser to cause a web server to run a Perl program using a CGI interface."
... in which case, Perl has very little to do with it. Assuming the server is configured correctly to run the CGI, all you have to do is cause the Applet to issue an HTTP request to the server.
That requires you to write Java code, unless the Applet is already capable of making such requests.