title: Using sed to replace line in perl
body: <p>I want to uncomment the line 168 at etter.conf file. The command runs OK in terminal but I'm getting an error while trying it in perl.</p>
  
  <pre><code>system ("sed -i '168s/.*/redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"/' /etc/etter.conf");
  </code></pre>
  
  <p><strong>Error is:</strong></p>
  
  <pre><code>Bareword found where operator expected at ./attack.pl line 135, near 
  ""sed -i '168s'/.*'/redir_command_on = "iptables"
  </code></pre>
  
  <p>I think is has something to do with the special characters and escapes.</p>