Created
November 2, 2016 16:09
-
-
Save tbrowder/90c50fff31beb1ee03da1f8b1a7552d0 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
#!/usr/bin/env perl6 | |
my $f = 'test-file.txt'; | |
my $sr = 'text'; | |
say "Testing on IO::Handle"; | |
my $fh = open $f, :w; | |
$fh.say: $sr; | |
say "== Reporting False:"; | |
say so $fh.t; | |
say so $fh.d; | |
say "== Reporting True:"; | |
say so $fh.e; | |
say so $fh.f; | |
say so $fh.r; | |
say so $fh.w; | |
#say so $fh.rw; | |
say "Smart match:"; | |
say "== Reporting False:"; | |
say $fh ~~ :t; | |
say $fh ~~ :d; | |
say "== Reporting True:"; | |
say so $fh ~~ :e; | |
say so $fh ~~ :f; | |
say so $fh ~~ :r; | |
say so $fh ~~ :w; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment