[% USE CSV -%]
[% CSV.dump([ 'Address' 'DNS' 'Interface' 'Description' 'Prefix' ]) %]

[% FOREACH row IN results %]
  [% mylist = [] %]
  [% FOREACH col IN [ row.alias row.dns row.port row.device_port.name row.subnet ] %]
    [% mylist.push(col) %]
  [% END %]
  [% CSV.dump(mylist) %]

[% END %]
