call an external c++ program

Discussion in 'Perl Misc' started by Deb.Fang@gmail.com, Jun 19, 2006.

  1. Guest

    I am having the hardest time finding information on the web so maybe
    someone could help. I have a perl CGI script accepting data from a
    form, this part is easy. But then, depending on the data from the
    form I need to call a C++ program and pass the data I just received to
    this c++ program. Then my C++ program will output results to a txt
    file. Then I use XML to get the output file formatted.
    now, I am stuck in the step how to call the c++ program and pass the
    data to the c++ program.

    I've found a lot of different references, but none have helped. If you
    have any input it would be appreciated.
    , Jun 19, 2006
    #1
    1. Advertising

  2. David Squire Guest

    wrote:
    > I am having the hardest time finding information on the web so maybe
    > someone could help. I have a perl CGI script accepting data from a
    > form, this part is easy. But then, depending on the data from the
    > form I need to call a C++ program and pass the data I just received to
    > this c++ program. Then my C++ program will output results to a txt
    > file. Then I use XML to get the output file formatted.
    > now, I am stuck in the step how to call the c++ program and pass the
    > data to the c++ program.
    >
    > I've found a lot of different references, but none have helped. If you
    > have any input it would be appreciated.
    >


    First question: why do you need Perl at all? Why not write your CGI
    program in C++?

    DS
    David Squire, Jun 19, 2006
    #2
    1. Advertising

  3. David Squire wrote:

    > First question: why do you need Perl at all? Why not write your CGI
    > program in C++?


    You do know that people get hung by their %s, $s, @s and &s for making
    such a remark?

    Josef, who could not resist
    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett
    Josef Moellers, Jun 19, 2006
    #3
  4. wrote:
    > I am having the hardest time finding information on the web so maybe
    > someone could help. I have a perl CGI script accepting data from a
    > form, this part is easy. But then, depending on the data from the
    > form I need to call a C++ program


    perldoc -f system

    > and pass the data I just received to
    > this c++ program.


    Dozens of different methods, depending on how you want to do it. Perl pretty
    much supports all the standard interprocess communication methods from
    signals and parameters to pipes, sockets, and and and. You name it, Perl got
    it.

    jue
    Jürgen Exner, Jun 19, 2006
    #4
  5. debbie523 Guest

    I am a new hand in this area, could u give me more details?
    Thanks a lot... !!!!
    debbie523, Jun 19, 2006
    #5
  6. debbie523 wrote:
    > I am a new hand in this area,


    Which area? Please quote context such that people know what you are talking
    about.

    > could u


    Who is u?

    > give me more details?


    More details about what? Please quote appropriate context -as has been
    customary on Usenet for 2 decades- such that people have a chance to know
    what you are talking about.

    If you are Google challanged (shamelessly copied from someone else):

    For [...] and everybody else with "User-Agent: G2/#.#":

    "How can I automatically quote the previous message
    when I post a reply?"
    http://groups.google.co.uk/support/bin/answer.py?answer=14213

    See also:
    http://www.safalra.com/special/googlegroupsreply/


    What's good 'netiquette' when posting to Usenet?
    http://groups.google.co.uk/support/bin/answer.py?answer=12348
    http://directory.google.com/Top/Computers/Usenet/Etiquette/

    But Google needs you to vote for 'Default quoting of
    previous message in replies'
    http://groups-beta.google.com/support/bin/request.py?contact_type=features

    jue
    Jürgen Exner, Jun 19, 2006
    #6
  7. debbie523 Guest

    Jürgen Exner wrote:
    > debbie523 wrote:
    > > I am a new hand in this area,

    >
    > Which area?
    > use perl cgi to build up an interface.



    >Please quote context such that people know what you are talking
    > about.
    >
    > > could u

    >
    > Who is u?
    > u is u


    > > give me more details?

    >more details about how to pass the received data as parameters and call a program which located in my another folder in a perl cgi script .


    > More details about what? Please quote appropriate context -as has been
    > customary on Usenet for 2 decades- such that people have a chance to know
    > what you are talking about.
    >
    > If you are Google challanged (shamelessly copied from someone else):
    >
    > For [...] and everybody else with "User-Agent: G2/#.#":
    >
    > "How can I automatically quote the previous message
    > when I post a reply?"
    > http://groups.google.co.uk/support/bin/answer.py?answer=14213
    >
    > See also:
    > http://www.safalra.com/special/googlegroupsreply/
    >
    >
    > What's good 'netiquette' when posting to Usenet?
    > http://groups.google.co.uk/support/bin/answer.py?answer=12348
    > http://directory.google.com/Top/Computers/Usenet/Etiquette/
    >
    > But Google needs you to vote for 'Default quoting of
    > previous message in replies'
    > http://groups-beta.google.com/support/bin/request.py?contact_type=features
    >
    > jue


    Thanks, jue. You gave me good suggestions.
    debbie523, Jun 19, 2006
    #7
  8. debbie523 Guest

    Jürgen Exner wrote:
    > debbie523 wrote:
    > > I am a new hand in this area,

    >
    > Which area?
    > use perl cgi to build up an interface.



    >Please quote context such that people know what you are talking
    > about.
    >
    > > could u

    >
    > Who is u?
    > u is jue.
    > > give me more details?

    >more details about how to pass the received data as parameters and call a program which located in my another folder in a perl cgi script .


    > More details about what? Please quote appropriate context -as has been
    > customary on Usenet for 2 decades- such that people have a chance to know
    > what you are talking about.
    >
    > If you are Google challanged (shamelessly copied from someone else):
    >
    > For [...] and everybody else with "User-Agent: G2/#.#":
    >
    > "How can I automatically quote the previous message
    > when I post a reply?"
    > http://groups.google.co.uk/support/bin/answer.py?answer=14213
    >
    > See also:
    > http://www.safalra.com/special/googlegroupsreply/
    >
    >
    > What's good 'netiquette' when posting to Usenet?
    > http://groups.google.co.uk/support/bin/answer.py?answer=12348
    > http://directory.google.com/Top/Computers/Usenet/Etiquette/
    >
    > But Google needs you to vote for 'Default quoting of
    > previous message in replies'
    > http://groups-beta.google.com/support/bin/request.py?contact_type=features
    >
    > jue


    Thanks, jue. You gave me good suggestions.
    debbie523, Jun 19, 2006
    #8
  9. debbie523 <> wrote:

    > I am a new hand in this area,



    What area?


    > could u give me more details?



    Details about what?

    You get the details on Perl functions by reading the standard
    documentation that comes with perl.

    If you don't understand what the docs for the system() function
    mean, then ask a question about what the docs for system() say.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Jun 19, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tobias Merler
    Replies:
    0
    Views:
    467
    Tobias Merler
    Sep 24, 2003
  2. Sanyi Benczik

    how to call an external program?

    Sanyi Benczik, Dec 14, 2003, in forum: C++
    Replies:
    10
    Views:
    995
    Chris Mantoulidis
    Dec 16, 2003
  3. Scott Allen
    Replies:
    8
    Views:
    10,907
    Scott Allen
    May 2, 2004
  4. Philipp Neuhaus

    [NEWBIE] How to call an external program

    Philipp Neuhaus, Sep 18, 2003, in forum: Python
    Replies:
    1
    Views:
    310
    Ulrich Petri
    Sep 18, 2003
  5. guest7

    How to call external c++ program

    guest7, Jan 4, 2009, in forum: C Programming
    Replies:
    0
    Views:
    405
    guest7
    Jan 4, 2009
Loading...

Share This Page