I have having a issue with escape characters when using the system() command trying to issue Linux OS commands.
CODE:
print "Please enter virtualhost 1 - Example - ucisha.com:";
my $virtualhost1 = <>;
system("ssh -t <HOST> \"sudo su - root -c 'perl -pi -e 's/xmlNamespaceAware=\"false\">/xmlNamespaceAware=\"false\"><Alias>$virtualhost1<\/Alias>/g' /tcserver/springsource-tc-server-node/UCISjvm/conf/krh.xml'\"");
ERROR MESSAGE:
ash: -c: line 0: syntax error near unexpected token `<'
bash: -c: line 0: `sudo su - root -c 'perl -pi -e 's/xmlNamespaceAware=false>/xmlNamespaceAware=false><Alias>kaldj'
Can some please help me out with these escape characters. Thanks in advance.