Help for this page

Select Code to Download


  1. or download this
    use IPC::System::Simple qw(run);
    
    my $exit_value1 = run("foo", @args);
    
    my $exit_value2 = run([0..5], "foo", @args);
    
  2. or download this
    use IPC::System::ExitValue qw/exit_value exit_signal/;
    
    system( "foo", @args );
    croak "foo stopped early" if exit_signal($?);
    my $exit_value = exit_value($?);
    
  3. or download this
    use IPC::System::ExitValue qw/assert_exit/;
    
    system( "foo", @args ) and assert_exit( 0 .. 5 );