if( grep /^\Q$scalar$/, @array ) { ## it's in there }