my @chars = split(//,$line); foreach my $char(@chars){ if($char =~ /\x{263a}/){ ... } }