diff options
-rw-r--r-- | lib/Octans/CLI.rakumod | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Octans/CLI.rakumod b/lib/Octans/CLI.rakumod index 8abfef8..4522571 100644 --- a/lib/Octans/CLI.rakumod +++ b/lib/Octans/CLI.rakumod @@ -44,10 +44,12 @@ multi sub MAIN ( } # Get the puzzle from $path if it's passed. - if $path.IO.f { - @puzzle = $path.IO.lines.map(*.words.cache.Array); - } else { - @puzzle = get-puzzle($path); + with $path { + if $path.IO.f { + @puzzle = $path.IO.lines.map(*.words.cache.Array); + } else { + @puzzle = get-puzzle($path); + } } # set-gray-squares also removes asterisks from @puzzle. |