You might want to check out the DataSocket JavaBean product available from NI for pretty darn cheap (http://sine.ni.com/apps/we/nioc.vp?lang=US&pc=mn&cid=4769).
It's not quite clear to me what the data source you're describing is, so it's hard to recommend examples. Also, there's a big difference between a perl example acting as a CGI and a piece of javascript that is executed from within a Web page, so I'm not sure what execution environment you had in mind, either. More info?
Regards,
John Lum
National Instruments