#!/usr/bin/perl use strict; use warnings; local $" = "'\n'"; open( STDERR, ">&STDOUT" ); my $xlsx_WSD = ( "C:\\Temp\\data.csv"),, 1; my @csvtemp; open( FILE, "<$xlsx_WSD" ) or die "oops\n"; my %data; my @titles; #heaader row while () { chomp; my @strings=split(/,/); foreach (my $i=0; $i<=$#strings; $i++) { #header titles if ($.==1) { $titles[$i]=$strings[$i]; } else { push @{$data{$titles[$i]}}, $strings[$i]; } } } foreach (@titles){ local $"="\t"; print "$_ \t= @{$data{$_}}\n"; }