Perl is seeing the pipe as alternation to nothing, i.e. 'either this or anything else'. Here are the details from a debugging perl (5.8.0-RC1):

$ perl -Dr pipe.pl Omitting $` $& $' support. EXECUTING... Compiling REx `lo/gos' size 4 Got 36 bytes for offset annotations. first at 1 rarest char / at 2 1: EXACT <lo/gos>(4) 4: END(0) anchored `lo/gos' at 0 (checking anchored isall) minlen 6 Offsets: [4] 1[6] 0[0] 0[0] 7[0] Guessing start of match, REx `lo/gos' against `lo/gou'... Did not find anchored substr `lo/gos'... Match rejected by optimizer Freeing REx: `lo/gos' Compiling REx `lo/gou' size 4 Got 36 bytes for offset annotations. first at 1 rarest char / at 2 1: EXACT <lo/gou>(4) 4: END(0) anchored `lo/gou' at 0 (checking anchored isall) minlen 6 Offsets: [4] 1[6] 0[0] 0[0] 7[0] Guessing start of match, REx `lo/gou' against `lo/gou'... Found anchored substr `lo/gou' at offset 0... Guessed: match at offset 0 lo/gou Freeing REx: `lo/gou' Compiling REx `lo/gw|' size 7 Got 60 bytes for offset annotations. 1: BRANCH(5) 2: EXACT <lo/gw>(7) 5: BRANCH(7) 6: NOTHING(7) 7: END(0) minlen 0 Offsets: [7] 0[0] 1[5] 0[0] 0[0] 6[1] 6[0] 7[0] Matching REx `lo/gw|' against `lo/gou' Setting an EVAL scope, savestack=16 0 <> <lo/gou> | 1: BRANCH Setting an EVAL scope, savestack=22 0 <> <lo/gou> | 2: EXACT <lo/gw> failed... 0 <> <lo/gou> | 6: NOTHING 0 <> <lo/gou> | 7: END Match successful! lo/gw| Freeing REx: `lo/gw|' Compiling REx `lo/gon' size 4 Got 36 bytes for offset annotations. first at 1 rarest char / at 2 1: EXACT <lo/gon>(4) 4: END(0) anchored `lo/gon' at 0 (checking anchored isall) minlen 6 Offsets: [4] 1[6] 0[0] 0[0] 7[0] Guessing start of match, REx `lo/gon' against `lo/gou'... Did not find anchored substr `lo/gon'... Match rejected by optimizer Freeing REx: `lo/gon'

After Compline,
Zaxo


In reply to Re: Am I on the pipe, or what? by Zaxo
in thread Am I on the pipe, or what? by BorgCopyeditor

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.