$ t() { perl -e' use open ":std", ":encoding(UTF-8)"; use if $ARGV[0], feature => "unicode_strings"; CORE::say join "|", split " ", "a\x20b\xA0c"; ' -- "$@" } $ t 0 a|b c $ t 1 a|b|c