I drank too much to night so I might regret this one.
Thanks for teh explanation on q, qq and qx. I understand what qw was used for, but I couldn't make the leap or connection to figure out what they meant on my own. I was sure I read a mention of it in the llama book, but I couldn't find it in the index.

I understood the context that Zaxo was putting it in (sort of), but I still don't quite follow on why "and" would be treated as an operator. Is it because Zaxo is only wrapping what I want to be an evaluated string only once in quotes? So when it evaluates it, it umm... that's the part that loses me. If Zaxo wrapped my $delta and $alpha in quotes already, why did it treat and as an operator? Does eval strip the outer nesting of quotes? I found that if I re-write Zaxon's code like this;

perl -e '($alpha, $delta) = qw{A D};$test = q(qq($delta and $alpha)); +print eval $test'
then I get the behavior that I want.

In reply to Re: Re: Re: Re: Resolving scalars in a scalar by SavannahLion
in thread Resolving scalars in a scalar by Anonymous Monk

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.