diff options
author | Ngô Ngọc Đức Huy <huyngo@disroot.org> | 2021-04-25 19:50:57 +0700 |
---|---|---|
committer | Ngô Ngọc Đức Huy <huyngo@disroot.org> | 2021-04-25 19:51:15 +0700 |
commit | 77d838ccaf481837adad17783b43fa195b702c33 (patch) | |
tree | 50c0cc07063de88dc15acd6bf785eb8e1bf67fa2 /utils | |
parent | bb8a0cfa74f84f2b5e4fcdfb292e290477bf9085 (diff) | |
download | haasdaiga-77d838ccaf481837adad17783b43fa195b702c33.tar.gz |
Output to stdout isntead of file
Diffstat (limited to 'utils')
-rw-r--r-- | utils/genwords.raku | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/genwords.raku b/utils/genwords.raku index 1ba9df8..89676ca 100644 --- a/utils/genwords.raku +++ b/utils/genwords.raku @@ -76,7 +76,7 @@ for "patterns".IO.lines -> $pattern { } sub MAIN($max-syllables, $n-outputs) { - my $output = open "output.txt", :w; + # my $output = open "output.txt", :w; for (1..$n-outputs) { my $word = ''; @@ -84,7 +84,8 @@ sub MAIN($max-syllables, $n-outputs) { for (1..$n-syllables) { $word ~= @possible-syllables[@possible-syllables.elems.rand.floor]; } - $output.say(rewrite($rewrite-rules, $word)) + # $output.say(rewrite($rewrite-rules, $word)) + say rewrite($rewrite-rules, $word) } - $output.close + # $output.close } |