title: XML editing inside a Perl script
body: <p>I am trying to us the perl -pi -e to edit the a line in a xml file. If I run the perl -pi -e command from the command line it works fine, but once I put in my script and use the system command I get the error listed below:</p>
  
  <p>su: invalid option -- i</p>
  
  <p>Try `su --help' for more information.</p>
  
  <pre><code>print "Please enter virtualhost 1 - Example - ucisha.com:";
    my $virtualhost1 = &lt;&gt;;
    system("ssh -t &lt;HOST&gt; \"sudo su - root -c perl -pi -e 's/xmlNamespaceAware=\"false\"&gt;/xmlNamespaceAware=\"false\"&gt;  &lt;Alias&gt;$virtualhost1&lt;\/Alias&gt;/g' /tcserver/springsource-tc-server-node/UCISjvm/conf/krh.xml\"");
  </code></pre>