Declaring local variables from CLI is broken.
I have tested this with V3.0 up to 3.4 with the same results.
/system script
add name="Variables" policy=ftp,reboot,read,write,policy,test,winbox,password,sniff
source="
:global global YES
:local local YES
:put "global is: $global"
:put "local is: $local"
When I do it from a script it works.
[admin@Louis] > /system script run Variables
global is: YES
local is: YES
When I do it from CLI I get an error.
[admin@Louis] > :global global YES
[admin@Louis] > :local local YES
[admin@Louis] > :put “global is: $global”
global is: YES
[admin@Louis] > :put “local is: $local”
expected end of command (line 1 column 17)
[admin@Louis] > :env print
“global”=“YES”
-Louis