Okay, my comments are a bit off the track of hopes' question, but they're generally in the same area.  So, here they are for what they're worth:

I'm still very much in the early stages of learning Perl, so I'm not sure of the subtle details of my observations.  Someone else might be able to elaborate on the causes or reasons.

Having said that, I've noticed that I can use either print "......" or print qq|.....| (I prefer bars or pipes) without a problem, with the exceptions sited by others above regarding the considerations of using double-quotes within the double-quotes associated with the print statement.

However, when I use the CGI module with the following line within my code:

my $q = new CGI;

I've noticed that I cannot be sloppy about my use of single-quotes and double-quotes, as I might otherwise.  Meaning, single and double quotes are no longer interchangeable.  The following line of code, as an example, is sensitive to quote choice when adding the line about "new CGI" mentioned above:
print $q->start_form(-method=>'post',  -action=>"order_form.cgi?ord_id=$ord_id")

The action reference to the cgi script has to be in double-quotes or the value of $ord_id won't come through; it will be passed as a literal value.  I'm not sure why the "new CGI" line causes this.  Just using the CGI module doesn't cause things to be so strict.  And, I don't think it's because of the commands I happen to be using, because there are some commands that I can use with the CGI module and not the "new CGI" statement (i.e., print "Location: order_form.cgi?ord_id=$ord_id \n\n" must be within double-quotes with "new CGI").


In reply to Re: Differences between qq() and "" by Spenser
in thread Differences between qq() and "" by hopes

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.