# snippet of the code sub buttons { my $csv_file = '/home/user/mydomain.com/cgi-bin/files/spreadsheet.csv'; my $csv = Text::CSV->new ( { allow_whitespace => 1, binary => 1, sep_char => '|' } ) or die "Cannot use CSV: ".Text::CSV->error_diag (); my $csv_fh; open ($csv_fh, "<:encoding(utf8)", $csv_file) or die "$csv_file : $!"; $csv->column_names($csv->getline($csv_fh)); #### [error] [client 66.200.100.66] sv_upgrade from type 8 down to type 6 at myscript.pl line 672, <$csv_fh> line 1. #### my @buttons; while (my $row = $csv->getline_hr($csv_fh)) { push(@buttons, $row) unless ($. == 1); } my %buttons_hash = ""; for my $button (@buttons) { my $this_item_name = ${$button}{item_name}; ${buttons_hash}{$this_item_name} = $button; } return \%buttons_hash; }