OK, here's the case that failed:
$ printf "x\0227 " | tmp.pl

Compiling REx `^&'
size 4 first at 2
   1: BOL(2)
   2: EXACT <&>(4)
   4: END(0)
anchored `&' at 0 (checking anchored) anchored(BOL) minlen 1 
Compiling REx `\W'
size 2 first at 1
   1: NALNUM(2)
   2: END(0)
stclass `NALNUM' minlen 1 
Using REx substr: `::'
Guessing start of match, REx `\\/^\\/+$' against `/usr/local/lib/perl5/5.6.1//i686-linux/Devel/Peek.pm'...
Found floating substr `'$ at offset 52...
Does not contradict STCLASS...
Guessed: match at offset 0
(Snipped up to the part where the regex is actually run because the compilation is exaclty the same, excluding differing memory addresss)
>x— <
SV = PV(0x80f4b84) at 0x80f4858
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x811d1e0 "x\227 "\0
  CUR = 3
  LEN = 80
Guessing start of match, REx `\d ' against `x— '...
Found anchored substr ` ' at offset 2...
This position contradicts STCLASS...
Looking for anchored substr starting at offset 2...
Found anchored substr ` ' at offset 2...
This position contradicts STCLASS...
Looking for anchored substr starting at offset 2...
Found anchored substr ` ' at offset 2...
This position contradicts STCLASS...
Looking for anchored substr starting at offset 2...
Found anchored substr ` ' at offset 2...
This position contradicts STCLASS...
Looking for anchored substr starting at offset 2...
Found anchored substr ` ' at offset 2...
This position contradicts STCLASS...
Looking for anchored substr starting at offset 2...
Found anchored substr ` ' at offset 2...
This position contradicts STCLASS...
Looking for anchored substr starting at offset 2...
Found anchored substr ` ' at offset 2...
This position contradicts STCLASS...
Looking for anchored substr starting at offset 2...
Found anchored substr ` ' at offset 2...
This position contradicts STCLASS...
Looking for anchored substr starting at offset 2...
Found anchored substr ` ' at offset 2...
This position contradicts STCLASS...
...etc. this repeats forever

In reply to Re: pattern match hangs on malformed UTF-8 input by Anonymous Monk
in thread pattern match hangs on malformed UTF-8 input by y9o

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.