my $c = 'some_scalar_data'; test_for_wide_chars: { require bytes; if ( bytes::length($c) > length($c) || ($] >= 5.008 && $c =~ /[^\0-\xFF]/)) { print "i found a wide character!" } no bytes; }