How to use flot.js plotting library from perl cgi scripts



I am trying to use cgi::application,flot.js,HTML::template module of perl
but i dont know how to pass or accept parameters with in the program if anybody can provide me sample code showing the use of jquery/flot.js with perl cgi::application and HTML::template or template toolkit it will be of great help as i am unable to find any sample code as to how to work it out.