podian has asked for the wisdom of the Perl Monks concerning the following question:
Is there a way to get the value 5 from that C program?int main() { return 5; }
I know I can do a printf (or cout) and capture the standard out in the perl script, but is there a way to in-line a C function/program and get the return value?
I thought it might be useful in some applications.
The main reason I am asking this is to get the output from the C function gettimeofday so that I can get the time at micro second granularity.
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: getting the return value from a C program
by Limbic~Region (Chancellor) on Mar 22, 2004 at 17:39 UTC | |
by graff (Chancellor) on Mar 23, 2004 at 02:50 UTC | |
|
Re: getting the return value from a C program
by waswas-fng (Curate) on Mar 22, 2004 at 17:43 UTC | |
|
Re: getting the return value from a C program
by matija (Priest) on Mar 22, 2004 at 17:45 UTC | |
|
Re: getting the return value from a C program
by calin (Deacon) on Mar 22, 2004 at 18:24 UTC | |
|
Re: getting the return value from a C program
by zentara (Cardinal) on Mar 23, 2004 at 15:53 UTC |