User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Perl section within the Software Development category of DaniWeb, a massive community of 427,487 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,394 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Perl advertiser: Programming Forums
Views: 3600 | Replies: 2
Reply
Join Date: Nov 2006
Posts: 4
Reputation: kamleshpdude is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kamleshpdude kamleshpdude is offline Offline
Newbie Poster

Help passing parameters from a perl program to a c++ .exe file

  #1  
Nov 1st, 2006
Hi,
I want to write a program in perl which will pass function parameters to a C++ .exe file and run the exe file with these parameters
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2006
Posts: 620
Reputation: KevinADC is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 33
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Master Poster

Re: passing parameters from a perl program to a c++ .exe file

  #2  
Nov 1st, 2006
look intot these operators/functions and decide which is best for your purposes:

system - runs a program but doesn't return program output to the perl script. Returns exit status, if any, of run program instead.

exec - runs a program but exits the perl program as soon as it's called

`` (backtiks) - runs a program and returns program output back to the perl script

qx// - same as backtiks
Reply With Quote  
Join Date: Jul 2006
Location: Deptford, London
Posts: 964
Reputation: MattEvans has a spectacular aura about MattEvans has a spectacular aura about 
Rep Power: 5
Solved Threads: 48
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Posting Shark

Re: passing parameters from a perl program to a c++ .exe file

  #3  
Nov 4th, 2006
whatabout pipes?
open my($what), "| bin/what.exe -p whatever";
close ($what);
you should be able to read back live/streaming status if the program sends it... and you can definately send a bulk stream of data to the program; if the program wants to receive it.

EDIT/PS:
be careful you don't do:
open my($what), "> bin/what.exe -p whatever";
close ($what);
unless you're not concerned about losing the exe =P
Last edited by MattEvans : Nov 4th, 2006 at 11:15 pm.
If it only works in Internet Explorer; it doesn't work.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Perl Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Perl Forum

All times are GMT -4. The time now is 6:54 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC