title: Excess symbol after reading a file
body: <p>I'm trying to run a command after reading a file.</p>
  
  <p>when I use <code>$hostname</code> in the command I see</p>
  
  <pre><code>ssh machine? ps auxw -U myname 2&gt;&amp;1
  </code></pre>
  
  <p>So I have a superfluous <code>?</code> there.</p>
  
  <p>My host file consists of:</p>
  
  <pre><code>machine01
  machine02
  </code></pre>
  
  <p>It is without any excess spaces and I have only pressed <code>Enter</code>.</p>
  
  <p>Please, check my example out:</p>
  
  <pre><code>sub CheckHosts {
  
      my $programname   = $_[0];
      my $HostsFileName = $ENV{'HOST_FILE'};
  
      open my $CFILE_HANDLE, "&lt; $HostsFileName" or die "Error: open file $HostsFileName--$!\n";
  
      while ( $hostname = &lt;$CFILE_HANDLE&gt; ) {
  
          print $hostname;    # Clear output without ?
  
          &amp;FindRunning( $programname, $hostname );    #Give my args in func
      }
  }
  </code></pre>
  
  <p>Next:</p>
  
  <pre><code>sub FindRunning {
  
      my $programname = $_[0];
      my $hostname    = $_[1];
  
      print $hostname;    # Debug and get clear output without ?
  
      my $logname = $ENV{'USER'};
      my $rc = open PSFD, "ssh $hostname ps auxw -U $logname 2&gt;&amp;1 |";
  }
  </code></pre>
  
  <p>How can I understand where the <code>?</code> comes from?</p>
  
  <p>The process hangs on a machine, where I start to run the script. Then I use:</p>
  
  <pre><code>$ps ax
  </code></pre>
  
  <p>And see the line contains</p>
  
  <pre><code>sh -c ssh machine01? ps auxw -U user 2&gt;&amp;1`
  </code></pre>
  
  <p>How should I check this line, and why does an excess symbol appear?</p>