my $utf8_flag = utf8::is_utf8($string) ? 1 : 0; print STDERR "For String '$string' UTF8-Flag is: $utf8_flag\n";