#!/usr/bin/perl use strict; use utf8; use locale; use encoding 'UTF-8'; use warnings; my $test = "État"; my $test2 = "É"; if ($test =~ /$test2/) {print "matches\n"} else {print "does not matches\n"}