call an external c++ program

D

Deb.Fang

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.
 
D

David Squire

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
 
J

Josef Moellers

David said:
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
 
J

Jürgen Exner

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

Jürgen Exner

debbie523 said:
I am a new hand in this area,

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

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
 
D

debbie523

Jürgen Exner said:
Which area?
use perl cgi to build up an interface.

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


Who is u?
u is u
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.
 
D

debbie523

Jürgen Exner said:
Which area?
use perl cgi to build up an interface.

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


Who is u?
u is jue.
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.
 
T

Tad McClellan

debbie523 said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top