use strict; use warnings;
#use encoding 'utf8';
use charnames ':full';
use feature 'say';
#use re qw(Debug COMPILE EXECUTE);

open FH, '<:encoding(utf8)', 'nobreak_utf8.txt' or die "Cant open";

while (<FH>) {

    say $_ =~ /\N{NO-BREAK SPACE}/;
    say $_ =~ / /;
    say $_ =~ /[\x7f-\x80]/;
    say $_ =~ /[\xa0]/;
    say $_ =~ /\xa0/;
}
