Different behaviour between file script and shell

Hello

Is it right that the same script doesn’t work if imported from a .rsc file, but works if copy-pasted?

{
  :global var 123
}
{
  :put ("Var contains ".$var)
}

is there any difference if you open them for editing?

is there difference if you print it?

No, if I open and save it, there’s no difference: it doesn’t work.

About printing the environment, this is my script

{
  :global var 123
}
{
  :environment print
  :put ("Var contains ".$var)
}

And this is the output

/import test_global_vars.rsc
var=123

Var contains 

Script file loaded and executed successfully