The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
[% USE CSV -%]
[% CSV.dump([ 'Location' 'Device' 'System Name' 'Vendor' 'Model' ]) %]

[% FOREACH row IN results %]
  [% mylist = [] %]
  [% device = row.dns || row.ip %]
  [% FOREACH col IN [ row.location device row.name row.vendor row.model ] %]
    [% mylist.push(col) %]
  [% END %]
  [% CSV.dump(mylist) %]

[% END %]