On Thu, May 10, 2018 at 8:04 PM, ToddAndMargo <toddandma...@zoho.com
<mailto:toddandma...@zoho.com>> wrote:
Hi All,
I am over on
https://docs.perl6.org/routine/indir
<https://docs.perl6.org/routine/indir>
I can make heads of tails out of what is going on.
I want to check is a file exists.
$ perl6 -e 'say indir("./EchoTest");'
===SORRY!=== Error while compiling -e
Calling indir(Str) will never work with any of these multi signatures:
($path, &what, :$test!)
($path, &what, :$d = Bool::True, :$r, :$w, :$x)
at -e:1
Many thanks,
-T
On 05/10/2018 05:18 PM, Brandon Allbery wrote:
Testing whether a file exists is smartmatching an IO::Path (or a Str
that gets coerced to one) against :e.
"indir" is not "is this file in this directory?", it's "run this code in
this directory instead of where I am now". So it's complaining that you
didn't tell it what code to run there.
Hi Brandon,
Ah poop! That explains it. I wrote down your explanation in
my directory notes.
Thank you!
-T