On Tue, Apr 7, 2020 at 6:48 PM ToddAndMargo via perl6-users <perl6-us...@perl.org <mailto:perl6-us...@perl.org>> 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