Last active
August 29, 2015 14:07
-
-
Save pmichaud/55a0a1543a4fd8a17d7c to your computer and use it in GitHub Desktop.
IO::Handle .ins bug
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
pmichaud@plum:~/p6/rakudo$ cat ins.p6 | |
my $fh = open("README.md"); | |
for $fh.lines() { | |
say $fh.ins; | |
last; | |
} | |
pmichaud@plum:~/p6/rakudo$ ./perl6 ins.p6 | |
0 | |
pmichaud@plum:~/p6/rakudo$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
my $fh = open("README.md");
my $seen = 10;
for $fh.lines() {
say $fh.ins;
last unless --$seen;
}
It seems to run 1 behind:
$ perl6 pm
0
1
2
3
4
5
6
7
8
9