Please use "$.source_dir/authors.txt".IO.lines instead of open + lines.
with the former you're expressing you really only want to read all the
lines out of the file and be done with it. when you open and then call
.lines, you're saying nothing about what you want to do with the file
handle afterwards, and so rakudo is forced to leave it open until you
.close it. When you use the .IO related methods, rakudo can open and
close it for you automatically.

OTOH, both your examples for LEAVE are correct. It does not matter where
in the block you put it as long as the variable you use inside it is
already declared with a "my".

HTH
  - Timo

Reply via email to