in reply to Turning off case sensitivity when using conditions

For the sake of TMTOWTDI:
if ($var =~ /^cheese$/i) { # got it }
That is regexp power man, but it is not the best solution. And I did not claim it is the fastest. (now comes the benchmark people:)

-- tune

Replies are listed 'Best First'.
Re (tilly) 2: Turning off case sensitivity when using conditions
by tilly (Archbishop) on Apr 24, 2001 at 16:08 UTC
    Try that with $var set at "cheese\n".

    I think you want \z rather than $ there...