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