title: How to insert variable in user-defined character class?
body: <p>What I am trying to do is to allow programs to define character class depending on text encountered. However, &lt;[]> takes characters literally, and the following yields an error:</p>
  
  <pre><code>my $all1Line = slurp "htmlFile";
  my @a = ($all1Line ~~ m:g/ (\" || \') ~ $0 {} :my $marker = $0; http &lt;-[ $marker ]&gt;*? page &lt;-[ $marker ]&gt;*? /); # error: $marker is taken literally as $ m a r k e r
  </code></pre>
  
  <p>I wanted to match all links that are the format "<a href="https://foo?page=0?ssl=1" rel="nofollow noreferrer">https://foo?page=0?ssl=1</a>" or 'http ... page ...'</p>