store result in variable

Hi,
could anyone help me

:local output [/ip neighbor print count-only]

:put (“result: $output”)

in this case value is stored into $output

but

:local output [/ip neighbor print]

:put (“result: $output”)

not this command, the content of print is not stored into the variable?
What I’m missing ?

thanks

Armand

You can not storage directly print output as file to variable.
Also you can not storage directly “ping” results inside a variable, except for count of positive response.

just missing the /file in line 2 before the get command

many thanks

Armand