use utf8; sub ff { print utf8::is_utf8($_[0]) ? 1 : 0, "\n"; } ff(asd => 1); # 1 ff("asd"); # 0