in reply to CX or System
qx acts like a double-quoted (interpolated) string, so you need to escape stuff, i.e.
my $dbpass=qx{ password_decode \$(grep "name=\\"db\\"" /opt/SecureSphe +re/etc/bootstrap.xml|cut -d\\" -f4) };
(untested)
Alternatively, declare your command using a non-interpolating quoting mechanism, and then pass it to qx{}:
my $cmd = q{ password_decode $(grep "name=\"db\"" /opt/SecureSphere/et +c/bootstrap.xml|cut -d\" -f4) }; my $dbpass = qx{ $cmd };
Hint: replace qx{} with qq{} and print it, and you'll see what the shell sees with your version, e.g.
password_decode 999 101 104 814 999 1035 1070grep "name="db"" /opt/Sec +ureSphere/etc/bootstrap.xml|cut -d" -f4)
|
|---|