title: How can I extract a substring enclosed in double quotes in Perl?
body: <p>I'm new to Perl and regular expressions and I am having a hard time extracting a string enclosed by double quotes. Like for example,</p>
  
  <pre>
  "Stackoverflow is
  
  awesome"
  </pre>
  
  <p>Before I extract the strings, I want to check if it is the end of the line of the whole text was in the variable:</p>
  
  <pre><code>if($wholeText =~ /\"$/)   #check the last character if " which is the end of the string
  {
     $wholeText =~ s/\"(.*)\"/$1/;   #extract the string, removed the quotes
  }
  </code></pre>
  
  <p>My code didn't work; it is not getting inside of the <code>if</code> condition.</p>