The problem with searching a solution for such a query is that one has to know the name of the concept behind the issue(here it is "interpolation") to get quickly to the answer. But then if one knew the concept, he/she wouldn't be facing the problem in the first place.

Yes, that's indeed a problem. That's why places like perlmonks, usenet and various IRC channels exist.

One appraoch that I'm eager to try out for Perl 6 is to write a tool that, given some piece of code, points you to the applicable documentation, and also tells you which possible usage of a character it is (for example the slash can be numeric division, or it can be the start of a regex).

In an ideal world, given the string

my $x = "\*E"

It would tell you that 'my' is a declarator (and point you to the docs), = is assignment (+ pointer to docs), "..." is a quote (+ pointer to docs", and \ introduces an escape sequence (+ pointer to docs).

For Perl 6 I know how to obtain the parse tree, but the docs are too sparse to make it useful right now. For Perl 5 it's hard to get the parse tree.

But it's on my list of long-term projects to hack on (and some of these projects done from time to time).

Perl 6 - links to (nearly) everything that is Perl 6.

In reply to Re^5: Problem using value of variable in a regular expression by moritz
in thread Problem using value of variable in a regular expression 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.