On Tue, 21 Mar 2017 at 09:53 ToddAndMargo <toddandma...@zoho.com
<mailto:toddandma...@zoho.com>> wrote:

    https://docs.perl6.org/language/io.html

     From the above manual, the example to check if a file exists:


    if "nonexistent_file".IO.e {
         say "file exists";
    }
    else {
         say "file doesn't exist";
    }


    Sound backwards to me.  What am I missing?


    Many thanks,
    -T

On 03/21/2017 02:56 AM, Simon Proctor wrote:
Just because the file is called "nonexistent_file" doesn't mean is
doesn't exist.

It's a poorly written example really.

if "possibly_existing_file".IO.e {
     say "file exists";
}
else {
     say "file doesn't exist";
}

Is more intuitive I would say.


Hi Simon,

   Mumble, mumble.

   Thank you for the help!

-T

Reply via email to