in reply to Running a C Program within Perl.

You should run your C program as system call within your perl code:
system('/tmp/example.c'); # or `/tmp/example.c` # back ticks


Hotshot

Replies are listed 'Best First'.
Re(2): Running a C Program within Perl.
by dmmiller2k (Chaplain) on Dec 27, 2001 at 21:10 UTC

    You probably don't mean to execute the actual .c file itself ... if memory serves, you'd probably want to run /tmp/example or /tmp/a.out (under UNIX) or /tmp/example.exe (under Windows/DOS).

    dmm

      You are correct, but how do I do that?

        You probably should read vek's or my original replies to your post a little more carefully.

        dmm

        You can give a man a fish and feed him for a day ...
        Or, you can
        teach him to fish and feed him for a lifetime