the code is listed here $logger->info("create zone on the switch $ip using zonecreate"); ($out,$err) = $ssh->capture2("zonecreate "); $ssh->error and die "remote find command failed: $!" . $ssh->error; print "$out\n"; $logger->info("zonecreate successful");