title: Display Output In Browser Perl CGI SSH
body: <p>I'm executing remote commands using Net::OpenSSH using a web frontend. My commands return without failure on the command line, but I get nothing in a web browser. I've done a couple hour research to no avail--any ideas?</p>
  
  <p>Here is some code to give you an example (some removed for obvious reasons).  </p>
  
  <pre><code>#!/usr/bin/perl -w
  use strict;
  use CGI ':standard';
  use Net::OpenSSH;
  # Here in the code is just the header and standard tags
  print "1";
  print "2"; # both display
  my $ssh = Net::OpenSSH-&gt;new($host, user =&gt; $uname, key_path =&gt; $key); # all works
  $ssh- error and die "Can't ssh to host" . $ssh-&gt;error;
  print "3";
  $ssh-&gt;system("uname -a") or
  die "remote command failed: " . $ssh-&gt;error;
  my @lsa = $ssh-&gt;capture("ls -a");
  $ssh-&gt;error and
  die "remote ls command failed: ". $ssh-&gt;error;
  
  print "4";
  print "5"; 
  print @lsa; # won't display in browser, just terminal/CLI
  </code></pre>
  
  <p>Cheers!</p>