use strict; use warnings; use Data::Dumper; use ReadCSV; my $hash_ref = ReadCSV::csv_file_hashref('parameters.conf'); foreach my $key (sort keys %{$hash_ref}){ print qq{$key:}; print join q{,}, @{$hash_ref->{$key}}; print qq{\n}; }