title: What's the difference between single and double quotes in Perl?
body: <p>I am just begining to learn Perl. I looked at the <a href="http://www.perl.com/pub/a/2000/10/begperl1.html" rel="nofollow noreferrer">beginning perl page</a> and started working.</p>
  
  <p>It says:</p>
  
  <blockquote>
    <p>The difference between single quotes and double quotes is that single quotes mean that their contents should be taken literally, while double quotes mean that their contents should be interpreted</p>
  </blockquote>
  
  <p>When I run this program:
  </p>
  
  <pre><code>#!/usr/local/bin/perl
  print "This string \n shows up on two lines.";
  print 'This string \n shows up on only one.';
  </code></pre>
  
  <p>It outputs:</p>
  
  <pre>
  This string
   shows up on two lines.
  This string
   shows up on only one.
  </pre>
  
  <p>Am I wrong somewhere?
  the version of perl below:</p>
  
  <pre><code>perl -v
  
  This is perl, v5.8.5 built for aix
  
  Copyright 1987-2004, Larry Wall
  
  Perl may be copied only under the terms of either the Artistic License or the
  GNU General Public License, which may be found in the Perl 5 source kit.
  
  Complete documentation for Perl, including FAQ lists, should be found on
  this system using `man perl' or `perldoc perl'.  If you have access to the
  Internet, point your browser at http://www.perl.com/, the Perl Home Page.
  </code></pre>