-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 It's not that it particularly dislikes it, but you have to think about it in what the options do, and what you want to accomplish.
In a regular Perl 6 script, you'd also have to consider the order in which you do a similar thing. First, you need to make sure the include paths are correct, so the module can be found. Then, you have to `use` the module, so that you can access the subs and classes it exports. Finally, you want to let it run some piece of code that gets you where you want to go. This is what -I, -M and -e do, respectively, when ran as a one-liner from the shell. On Sun, 3 Jun 2018 15:47:06 -0700 ToddAndMargo <toddandma...@zoho.com> wrote: > >> On Sun, 3 Jun 2018 15:22:17 > >> - -0700 ToddAndMargo <toddandma...@zoho.com> wrote: > >> > >>> On 06/03/2018 03:06 PM, Brad Gilbert wrote: > >>>> It's -I. not -I > >>> > >>> perl6 -I. -MRunNoShell '( my $a, my $b ) = RunNoShell("ls > >>> \*.pm6"); say $a;' Could not open ( my $a, my $b ) = > >>> RunNoShell("ls \*.pm6"); say $a;. Failed to stat file: no such > >>> file or directory > > On 06/03/2018 03:39 PM, Patrick Spek via perl6-users wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA256 > > > > You're missing `-e` here, it should be > > > > perl6 -I. -MRunNoShell -e '( my $a, my $b ) = RunNoShell("ls > > \*.pm6"); > > > > For further clarification, the `.` after `-I` indicates the > > directory that is being added to the paths Perl 6 checks for > > libraries that are being used. Hence the `.` is needed to indicate > > the current directory. I'm not sure if `-I` arguments get appended > > or prepended to the list of paths. > > > > The `-e` is for the expression that is to be run. Otherwise, it'll > > try to open the argument as if it were a filename, which is why you > > get the "no such file or directory" error. > > > > Indeed! Thank you! I am putting this in my Keepers one liner file! > > perl6 -I. -MRunNoShell -e '( my $a, my $b ) = RunNoShell("ls"); say > $a;' > > And it does not like the -e until after the I and the M -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE4eL662U9iK2ST2MqN/W6H45XOE8FAlsUcmUACgkQN/W6H45X OE/imQf/dNAwMg2/ufFx+5lukuoNjDqEsHsmuOIfR8hk/UZANfC0FYTW5vD6wHXb DFjwXzmSddAKn9FQkp3A0LuRb01RXn7Bd1i9aUI+a/1Q4djXRyD4TJDVhrE3OAXo o4/T3DKnNQchcvyMjxog1fimPUZspC9jGz57FJUnA3Q3lKgS7HHsT+aUIs34lyC7 HiTtuWXrL1EFxGgww96ig6ce+/yaRT8oFzadGBcokmo+mP6b4oCufqmJYRXohjUh oQxSRnduzgnHyIoxFeUFpIqZYK/8471wD4Eqz//QyBBOltQR8s2Bj2BaFDpnB2Gy 3XWRmdgCVJlKvkWH+dHumsWR9ZiaYw== =/+hA -----END PGP SIGNATURE-----