system command in CGI

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • idorjee
    New Member
    • Mar 2007
    • 76

    system command in CGI

    Hi, can anyone plz help me. I'm trying to run the 'pepwindow' program on the input from my html form, and my script doesn't work. The following '-goutfile' option in the system command is for the output filename and '-gdirectory' for the directory.

    Thanks alot.

    [CODE=perl]
    #!/usr/bin/perl -w
    use CGI;
    use CGI::Carp qw(fatalsToBrow ser);

    my $fasta=$cgi->param('SEQUENC E');
    system("/usr/local/bin/pepwindow $fasta -graph png -goutfile output -gdirectory temp/");
    .......
    [/CODE]
    Last edited by miller; Aug 30 '07, 12:51 AM. Reason: Code tag
  • miller
    Recognized Expert Top Contributor
    • Oct 2006
    • 1086

    #2
    I avoid all system commands in CGI scripts.

    Instead use Proc::Reliable.

    - Miller

    Comment

    • KevinADC
      Recognized Expert Specialist
      • Jan 2007
      • 4092

      #3
      I have never used that module but I get edgy when a module is several years old, has no recent updates and is the only module contributed by the author. Does it seem to work OK for you?

      Comment

      • idorjee
        New Member
        • Mar 2007
        • 76

        #4
        thanks Miller, i will try and see if the module does the trick.


        Originally posted by miller
        I avoid all system commands in CGI scripts.

        Instead use Proc::Reliable.

        - Miller

        Comment

        • miller
          Recognized Expert Top Contributor
          • Oct 2006
          • 1086

          #5
          Originally posted by KevinADC
          I have never used that module but I get edgy when a module is several years old, has no recent updates and is the only module contributed by the author. Does it seem to work OK for you?
          Kevin,

          I maintain some code that uses this module to encapsulate pdf generation, but I've never written any myself. However, it's always worked well that I can see, and I've assumed that it was used because of the relatively unstable nature of the secondary program.

          I'm not sure I would use it if I had to create any new code for the very reasons that you stated. However, that's mostly because I avoid any system calls at all in all of my code.

          - Miller

          Comment

          Working...