From 77d838ccaf481837adad17783b43fa195b702c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ng=C3=B4=20Ng=E1=BB=8Dc=20=C4=90=E1=BB=A9c=20Huy?= Date: Sun, 25 Apr 2021 19:50:57 +0700 Subject: [PATCH] Output to stdout isntead of file --- utils/genwords.raku | 7 ++++--- 1 file 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 }