develooper Front page | perl.perl6.users | Postings from July 2021

Re: use lib and locations in a variable

Thread Previous | Thread Next
Bruce Gray
July 11, 2021 22:27
Re: use lib and locations in a variable
Message ID:

> On Jul 11, 2021, at 1:13 AM, ToddAndMargo via perl6-users <> wrote:


> $*PROGRAM.parent is just a silly dot.



That is true only when the program you are running happens to be in your current directory
(as is very common, but not nearly universal, and not the case for Joe’s use case).

cat > a.raku <<END
    say \$*PROGRAM.parent;
raku a.raku

mkdir        Temp_some_subdir
mv -i a.raku Temp_some_subdir/
raku         Temp_some_subdir/a.raku
OUTPUT: "Temp_some_subdir”.IO

Hope this helps,
Bruce Gray (Util of PerlMonks)

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About