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