#!/usr/bin/perl use strict; use warnings; use encoding "cp852"; use utf8; my $a="aáaxBy"; $a =~ /(.*?)x(A*)y/; #### Malformed UTF-8 character (unexpected continuation byte 0xa1, with no preceding start byte) in pattern match (m//) at c:\Perl\work\gi\utftest.pl line 9.