in reply to \cI vs \t in regex

"bug" in the interaction of \cI and /x. Note:

> perl -MO=Deparse -e"/\cI/x" / /x; -e syntax OK > perl -MO=Deparse -e"/\t/x" /\t/x; -e syntax OK

Note that I'd never use \cI since \t is portable.

- tye        

Replies are listed 'Best First'.
Re^2: \cI vs \t in regex (bug)
by throop (Chaplain) on Apr 24, 2007 at 19:31 UTC
    Thanks - I'm slightly glad to know that it's a bug and not Yet Another Obscure PERL feature that I'd missed. :-)

    I ran across it because I was trying to run down a failure to match a pattern, where the pattern was stored (uncompiled) in a variable. I printed out the variable in the debugger - although I'd composed it with \t it prints with \cI. So I was cutting and pasting, trying to narrow down where the pattern match was failing - and got horribly bitten.

    Such is war and programming. Meta-question - where is the someplace to report bugs like that?

    throop

Re^2: \cI vs \t in regex (bug)
by ysth (Canon) on Apr 25, 2007 at 09:48 UTC
    If you are using t as your regex delimiter, \t is a literal t, but \cI is a tab.