|Do you know where your variables are?
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.
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!
r. j o s e p h
"Violence is a last resort of the incompetent" - Salvor Hardin, Foundation by Issac Asimov