in reply to RegExps that are only partly case-insensitive

You almost gave the answer yourself. The (?i:...) construct can be used to "cloister" (?) the modifiers. Try this:
% perl -ne 'print +(/(?i:var)=value/)?"Ok\n":"Not Ok\n"' var=value Ok Var=value Ok var=Value Not Ok VaR=value Ok VaR=valuE Not Ok

--ZZamboni

Replies are listed 'Best First'.
RE: Re: RegExps that are only partly case-insensitive
by dcorbin (Sexton) on Sep 06, 2000 at 18:55 UTC
    I don't find (?i:) documented in my Camel(2ed) book. Is that new? If I missed it completely, can you give me a page reference?
      Camel 2 is about 5.003. That feature wasn't added until 5.005. Camel 3 documents something kindof like 5.6.1, which isn't out yet. (There are a few places in the camel that document what 5.6 should become. :)

      -- Randal L. Schwartz, Perl hacker

        Ahh! I'm still on 5.004, so I don't feel too bad about not finding it in the documentation... Thanks.