On Tue, Mar 21, 2017 at 3:01 AM, ToddAndMargo <toddandma...@zoho.com
<mailto:toddandma...@zoho.com>> wrote:

    Hi All,

    How to I do this bash code in Perl 6?

    if [ ! -f "$PathAndName" ]; then touch "$PathAndName" fi

    I am not finding the directions on how to create a "new"
    file at a specific location.

    Many thanks,

On 03/21/2017 03:07 AM, Brent Laabs wrote:
You can create a file by opening a filehandle for writing.

$PathAndName.IO.f or $PathAndName.IO.open(:w).close;

Hi Brent,
Oh, so the act of opening it will create it, if it doesn't exist.

Thank you!


Reply via email to