DHCP server automation

Hello dear friends, I am trying to run this script. I do not work with the purpose of this script, which is to scan the addresses generated by the DHCP server leases. It is to create a main queue and sub queues for the scanned IPs.

If you could help me, thank you.


 :global leases [/ip dhcp-server lease print];
:foreach lease in=$leases do {
  :global user_name = $lease.client-id;
  :global queue_name = "cliente" + $user_name;
  :log info "Creating queue: $queue_name"
  /queue simple add name=$queue_name parent=TOTAL;
}