On 2020-06-07 13:57, ToddAndMargo via perl6-users wrote:
On 2020-06-07 13:53, Peter Pentchev wrote:
$path = 'lib1'.IO.d ?? 'lib1' !! 'lib2';
Got it! Thank you!
I am not seeing the above enter the proper syntax:
'lib1', 'lib2' etc.
Where is the comma? How are the single quotes entered?
-T
what am I doing wrong?
~~~~~~~~~~~~~~~~~~~~~~
#!/usr/bin/env raku
my $path;
BEGIN {
# $path = 'K:/NtUtil'.IO.d ?? 'K:/NtUtil' !! 'C:/NtUtil'; # "" true;
!! false
$path = Q['] ~ 'X:/NtUtil'.IO.d ?? 'X:/NtUtil' !! '';
$path = Q['] ~ $path ~ Q[', 'C:/NtUtil', '.'];
}
use lib $path;
print $path ~ "\n";
~~~~~~~~~~~~~~~~~~~~~
K:\Windows\NtUtil>raku use.lib.test
===SORRY!=== Error while compiling K:\Windows\NtUtil/use.lib.test
An exception occurred while evaluating a BEGIN
at K:\Windows\NtUtil/use.lib.test:5
Exception details:
Failed to find 'X:\NtUtil' while trying to do '.d'
in block at use.lib.test line 7