Hello all, I am trying to take an existing perl script, which works correctly, and make it accessible via our server (mac os x). The script takes user input, just a series of DNA sequences to compare, and parses the data from this pair from a master file of all pairwise comparisons. This data is then written to an output file (output.fpd). All of the above works correctly through an HTML form page and GET function in CGI. The problem I'm having is the following system command. Which reads:  system ("./gnuplot <ibd_wndo_R5_5.p"); At this point, I just want to be able to generate the plot on the server through CGI. I'll worry about how to post it later. Instead of generating the appropriate image, the browser displays gnuplot related text: %!PS-Adobe-2.0 %%Creator: gnuplot 4.2 patchlevel 4 %%CreationDate: Tue Jul 14 12:15:07 2009 %%DocumentFonts: (atend) %%BoundingBox: 50 50 554 770 %%Orientation: Landscape %%Pages: (atend) %%EndComments %%BeginProlog /gnudict 256 dict def gnudict begin % % The following 6 true/false flags may be edited by hand if required % The unit line width may also be changed % /Color true def /Blacktext false def /Solid false def /Dashlength 1 def /Landscape true def /Level1 false def /Rounded false def /TransparentPatterns false def /gnulinewidth 5.000 def /userlinewidth gnulinewidth def % /vshift -33 def /dl1 { 10.0 Dashlength mul mul Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if There's a ton more, but I don't know how informative it would be. Again, the script runs completely successfully as a perl script from the same folder; is there something special about the system command in CGI which causes this difference?

In reply to CGI gnuplot via system command by RussCD

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.