my $utfData = "\x..."; open UTF, '<:encoding(utf8)', \$utfData or die 'Must be pre-5,8'; die 'Bad stuff happened' unless eq 'Whatever you expect';