my $string = 'blabla'; my $is_unicode = utf8::is_utf8($string) ? 'YES' : 'NO'; print "my string: $string is unicode: $is_unicode\n";