use System::Command; my @cmd = qw( true ); my $cmd = System::Command->new( @cmd ); $cmd->exit(); # exit status