#!/usr/bin/perl -w use strict; use Class::CSV; my $report_csv = Class::CSV->new ( filename => "final.csv", fields => [qw/VM_Name VM_Cluster vFiler_IP vFiler_Cluster MisMatch/], ); $report_csv->add_line( { VM_Name => "VM1", VM_Cluster => "CLUSTER_1", vFiler_IP => "1.1.1.1", vFiler_Cluster=> "CLUSTER_2", MisMatch => "What_is_that", } ); $report_csv->print(); #### $report_csv->print(); #### $report_csv->print();