Nathan Wiger writes:
>    $x =~ /a/;   # $x is roughly equivalent to a

I've been going at high speed through this thread, but has
anyone mentioned:

  m{$foo}{^baz.*bar$}i
  s{$foo}{(\w+) \1}{$1}g

With the first part of m{} and s{} containing an expression.

We lose !~ there, though.

Thoughts on how to indicate negation:

 * use ! as delimiter.  Ugh.  Special delimiters bad.

 * use m!{}{}.  Ugh.  Mixed alnum and punctuation bad.

 * use ! in front (I like this, as it's back to being normal Perl)

   ! m{$foo}{^baz.*bar$}i

Read as "doesn't match".

Nat

Reply via email to