title: Julia - Printing or Writing in a file a Backslash in a String
body: <p>I need, in Julia to write in a file, a LaTeX command, here is a minimal example :</p>
  
  <pre><code>open("./file.tex", "w") do f
     foo::Int = 5
     # write(f, "$foo\hline \n")        - This is what I would like to do
     # write(f, "$foo \\ \n")           - This is another thing I want to do, and it works
     # write(f, "$foo \\\hline \n")     - My final goal is this -&gt; 
                                          leads to ERROR: syntax: invalid escape sequence
  end
  </code></pre>
  
  <p>You've understand what I want, I'd like to have a string with a backslash in it, but not as an escape character. 
  This doesn't work :</p>
  
  <pre><code>julia&gt; "\"  # Error
  </code></pre>
  
  <p>neither this</p>
  
  <pre><code>julia&gt; "\\\hline"
  </code></pre>