title: Perl one liner to find and replace in a file with a variable
body: <p>I'm trying to find <code>&lt;li &gt;&lt;a href='xxxxxxxx'&gt;some_link&lt;/a&gt;&lt;/li&gt;</code> and replace it with nothing. To do this, I'm running the command below but it's recognizing $ as part of a regex. </p>
  
  <p><code>perl -p -i -e 's/&lt;li &gt;&lt;a href=.*$SOMEVAR.*li&gt;\n//g' file.html</code></p>
  
  <p>I've tried the following things,<br>
  <code>${SOMEVAR}</code><br>
  <code>\$SOMEVAR</code><br>
  <code>FIND="&lt;li &gt;&lt;a href=.*$SOMEVAR.*li&gt;"; perl -p -i -e 's/$FIND//g' file.html</code></p>
  
  <p>Any ideas? Thanks.</p>