RE: executing c program from perl and calling subroutines

2002-07-03 Thread Anders Holm
Hi. [snip] > How can I call a subroutine which is defined in another file i.e. > the calling > perlscript and the function are in different files. [snip] When asking a new question, consider either a new thread or cutting down the text of the message, whichever you prefer.. ;) You are looking a

RE: executing c program from perl and calling subroutines

2002-07-02 Thread krishnag
HI, Thanks for the various suggestions, as it turned out I had a blank first line in the program file and when I removed it the backquotes method worked.I do not know why this happens? How can I call a subroutine which is defined in another file i.e. the calling perlscript and the function are

RE: executing c program from perl script and grabbing output

2002-07-02 Thread Shishir K. Singh
On Tuesday, July 2, 2002, at 11:23 , drieux wrote: >> I have a c program which takes two commandline arguments (both strings) >> and >> prints out a line. If I use system then I am not able to grab the output >> of the >> program and if I use backquotes `` then the arguments are also treated a

Re: executing c program from perl script and grabbing output

2002-07-02 Thread drieux
On Tuesday, July 2, 2002, at 11:23 , Shishir K. Singh wrote: >> I have a c program which takes two commandline arguments (both strings) >> and >> prints out a line. If I use system then I am not able to grab the output >> of the >> program and if I use backquotes `` then the arguments are also

RE: executing c program from perl script and grabbing output

2002-07-02 Thread Shishir K. Singh
>I have a c program which takes two commandline arguments (both strings) and >prints out a line. If I use system then I am not able to grab the output of the >program and if I use backquotes `` then the arguments are also treated as >commands and I get an error. > Is there any other way to do

Re: Executing c program

2001-07-12 Thread saurabh . bansal
my $returnCode=defined($cmd) ? system($cmd." ".join(" ",sort @hitList)) : 0;