On 3/29/07, sanofsans <[EMAIL PROTECTED]> wrote:
> I have this simple c program that invokes a perl program.
>
> #include <stdio.h>
>
>
> void main()
> {
> system("perl perl1.pl");
> return;
> }
>
>
> Now, perl1 should be a char varible that changes according to the
> user's choice.
> My question is now, how do you pass a variable to the command:
>
> system("perl variable.pl");
>
> Any help is greatly appreciated!
Use sprintf() to build your command string and pass that into the
system() function.
-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world."
-- Jelaleddin Rumi