in reply to gnuplot and CGI

Your post brings back fond memories of what I was doing during the Internet boom five years ago.

But to answer your questions..

I just re-directed the output from the gnuplot command to a temporary file with the .out suffix.

Sure, but that's probably not what you want to do.

That's what I did. I just called a routine to cook up a temporary file name and used that in the gnuplot command file. The temporary files went into /var/tmp, and I even wrote a script to clean up that directory every an hour, having no idea that of course there was already a utility to do that (tmpwatch). At least I knew enough to use cron.

Yup. Works great! Just be sure to clean up after yourself. Were I doing this again, I would use File::Temp to create temporary files. Back then I was a skilled C programmer fumbling my way around Perl, but learning fast.

Good luck!

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Replies are listed 'Best First'.
Re^2: gnuplot and CGI
by kryberg (Pilgrim) on Nov 09, 2004 at 19:43 UTC
    Thanks for your reply. I was excited to run across the link to your graphs because you used gnuplot and the web interface is the same idea as what I need to do.

    It appears that I do need to send the image data to the browser though. This will be on a secure server that is out of my control. The people in charge have not been very supportive of on-the-fly graph generation. I've been doing some testing hoping I could find a way to write the file to the server but a cgi program cannot write a file because of the security restraints.