Array script

Hi,
I’m using ros 5.23
My script:

:local ipam [:toarray [:for i from=1 to=2 do={ :put "10.15.32.$i," }]]
:put $ipam;

Output:

/system script> run a 
10.15.32.1,
10.15.32.2,
;10.15.32.2,

I want to have output in this format:

10.15.32.1;10.15.32.2

What have I to modify?

After that you need to Loop through each entry in the address list.

How about:

:local ipam "";
:for i from=1 to=2 do={
 :if ( $ipam != "" ) do={ :set ipam "$ipam;"; };
 :set ipam ( $ipam . "10.15.32.$i" );
}
:put $ipam;

Thank you.