This runs, but both $result and $err have nothing in them when I print them.

Why?  This is on OpenSolaris:

sub get_reddwarf_status
{
   my $result;
   my $err;
   execute_command("echo test",undef,$result,$err);
   print STDERR "result: ",$result,"\n";
   print STDERR "err: ",$err,"\n";
   return $result;
}