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...
    }