166

Executing External Commands
The System Function

  • The system() function executes a specified command line

  • The return value is the integer value returned by the shell

      $err = system( "ls -l | more" );

  • Here the more command can be used becuase the new shell inherits STDIN, STDOUT, and STDERR