in reply to Turning off case sensitivity when using conditions

Force both halves of the comparison to be the same case using lc() or uc(), perhaps even \L or \U depending on your needs.

if ( lc($word) eq lc($word1) ) { ... }

    --k.