Created
March 16, 2017 14:50
-
-
Save cowens/1f72cffb2ec17d50fe923b74e38e6283 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Str) | |
4 | |
exCCx81 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl6 | |
use v6; | |
my $out = open "test.txt", :w, :bin; | |
my $buf = Buf.new(0x65, 0xcc, 0x81, 0x0a); | |
$out.write: $buf; | |
my $in = open "test.txt", :enc<utf8-c8>; | |
my $s = $in.slurp-rest; | |
$s.WHAT.say; | |
$s.chars.say; | |
$s.say; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment