I agree with what both stephen and dws said, and I have had some really good luck with Finance::Quote on a variety of sites. I would think that using a full Java applet would be somewhat overkill - I assume that you need to get the stock quotes from the applet to display on a dynamically generated page? If so, then the overhead needed to load the Java applet would be much greater than the overhead to just execute a CGI script.
in reply to Grabbing data from a java applet
And as dws said, unless you are writing the Java applet yourself (in which case I imagine that you would already know how to pass data to the perl script), I doubt that you want to reverse engineer the whole applet :). Just my $0.02!
"Violence is a last resort of the incompetent" - Salvor Hardin, Foundation by Issac Asimov