Of course %*ENV is case sensitive, hashes are case sensitive.

    say %*ENV.^name; # Hash

%*ENV gets populated with the values before your code runs.
Other than that it is fairly ordinary.

On Tue, Apr 7, 2020 at 7:20 PM ToddAndMargo via perl6-users <
[email protected]> wrote:

> >> On Tue, Apr 7, 2020 at 6:48 PM ToddAndMargo via perl6-users
> >> <[email protected] <mailto:[email protected]>> wrote:
> >>
> >>     Hi All,
> >>
> >>     $ raku -e 'say %*ENV;'
> >>
> >>     Gives me ALL of them.  Is there a way to just ask for
> >>     a particular one, such as %appdata%, or %userprofile%
> >>     in Windows or $HOME is Linux?
> >>
> >>     Many thanks,
> >>     -T
> >>
>
> On 2020-04-07 16:05, Gerard ONeill wrote:
> > It’s still a hash — the * twigil tweaks it’s scope, but it is still a %
> > — so %*ENV<Path> works (windows)
> >
> >
> Hi Gerald,
>
> Ah Ha!  Thank you!
>
> Windows 10:
>
>     raku -e "say %*ENV<APPDATA>;"
>     C:\Users\todd\AppData\Roaming
>
>
> Fedora:
>     $ raku -e 'say %*ENV<HOME>;'
>     /home/tony
>
> Oh, and both WIndows and Fedora (Linux) are case
> sensititive
>
> Love Hashes.  My favorite variable structure.
>
> -T
>

Reply via email to