define globals by iterating array
Posted: Fri Nov 26, 2021 4:11 pm
Hi, I am new to scripting I was wondering if there is a way to define globals from an array something like this..
I tried that but it didn't work coz of the :global <name>, any alternatives.. ?
Thanks
Code: Select all
:global env { "foo"="bar"; "foo2"="bar"; "baz"="foo" }
:foreach key,value in=$env do={ :global $key $value }
Thanks