Help for this page

Select Code to Download


  1. or download this
    my ($stdout, $stderr, $ret) = capture {
        system('foo',
    ...
            ($otherarg ? ('--otherarg' => $otherarg) : ()),
        );
    };
    
  2. or download this
    return {
        status => $s,
        ($optional_field ? (optional_field => $optional_field) : ()),
    };