On 2020-08-24 04:19, Tom H wrote:
On Sun, Aug 23, 2020 at 3:30 AM ToddAndMargo via users users@lists.fedoraproject.org wrote:
On 2020-08-22 15:07, ToddAndMargo via users wrote:
I use absolute paths when I will sometimes be operating outside the shell.
Okay, before someone tells me that bash programs ALWAYS run inside the shell and I do not path many of the other comands, it is because I program in Raku a lot. I ADORE Raku. (The documentation stinks though.) And I use nmcli a lot inside Raku.
And I prefer run system command OUTSIDE the shell, especially since my programs often run outside the shell as well.
I guess that what you call "outside the shell" means non-interactively.
In Perl 5, you can set the PATH just like in a shell script with '[local] $ENV{PATH} = "...";'. Didn't Raku keep this or replace it with something of similar purpose?
I have forgotten most of what I learned in Perl 5. When Perl 6 hit, I jumped on it. I program in Top Down and live and both modules and subroutines. Perl's 5 method of calling subs is a freaking nightmare. Raku's sub declarations are a dream.
By "outside the shell", I mean that bash and friends are not involved. $PATH is part of bash's shell. The programs themselves are call directly.
In Raku, it looks like this:
$proc = run( @RunArray, :err, :out, :bin );
You place each parameter in a separate cell. This gets around the "space" in the parameter issue