Page 1 of 1

define globals by iterating array

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

Thanks