Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Running a C Program within Perl.

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

Help for this page

Select Code to Download


  1. or download this
    my $cmdToRun = "/path-to/the-c-prog";
    system ($cmdToRun) && die "system $cmdToRun - $!\n";
    
  2. or download this
    my $cmdToRun = "/path-to/the-c-prog";
    my @results = `$cmdToRun`;
    
  3. or download this
    my $cmdToRun = "/path-to/the-c-prog";
    open (CMD, "$cmdToRun |") || die "open $cmdToRun - $!\n";
    while (<CMD>) {
      # loop through the program output here...
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-25 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found