in reply to Pattern matching with a variable

if (index(uc($library), uc($entry)) < 0)
or
if ($library =~ /\Q$entry\E/i)