Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Running a C Program within Perl.

by hotshot (Prior)
on Dec 27, 2001 at 20:30 UTC ( [id://134633]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://134633]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-25 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found