Yeah, I looked at your code, it is hard to say where the glitch is.
The $function seems to come through OK, when I print it out
while accessing the script. But you try to "get slick" and resend
the $function back to the script to then feed it to gnuplot. You need
to "re-encode" that get string in that "img src" line below.
Notice in the browser url window, when you submit
http://localhost/~zentara/cgi-bin/gnuplot_...submit=continuewell, that is how your "img src" line below needs to be encoded to.
Maybe you could save the "raw encoded get string" when it comes in,
to avoid having to re-encode it?
I get apache reporting errors in your line
p("<img
src="gnuplot_1.pl?submit=plot&function=$function&domain=$domain&range=$range"
Why don't you try writing the gnuplot output to a temporary file, and
send that file, then delete it. That way you can get it to work for
sure.
There are too many "layers of complexity" to easily spot the problem.
I have seen those problems before myself, and was only able to solve it
by randomly trying different quoting until it worked. :-)
Also, I don't use CGI to output html, so I'm not the right person
to debug your blockquote problem.
Maybe try a version where you manually output the html, like in
"here docs", and avoid the extra layer of complication which CGI's
html output throws at you.
Sorry but I'll leave that long job up to you. :-)
--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html