in reply to Help in a cgi script

What is CGI about your code? Make your life easier by *actually* using CGI:

use CGI; my $query = new CGI; my $xmin = $query->param('xmin'); etc.

But as to the rest of what you are trying to do (javascript?), I'm clueless.

—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot