Script doesn't work ok. Please help me solve problem

If I run this:
:foreach ip in=[/ip firewall address-list find] do={
:put [/ppp active find address=[get $ip address]];
}It returns the error:

interrupted
           invalid value for argument address

Whereas if I save the address as a variable first, then it works.
:foreach ip in=[/ip firewall address-list find] do={
:local add [get $ip address]
:put [/ppp active find address=$add];
}Dunno why…