Well, let's say that special characters, etc. no.
First you open the file:
open my $fh, '<', 'some.file.csv' or die "Cannot open: $!";
Then you read from it in a loop:
while (my $line = <$fh>) {
Then you remove the trailing white characters (\ n and others):
$line =~ s/\s*\z//;
:
my @array = split /,/, $line;
, :
my $key = shift @array;
:
$hash{$key} = \@array;
(\ @array ).
:
my %hash;
open my $fh, '<', 'some.file.csv' or die "Cannot open: $!";
while (my $line = <$fh>) {
$line =~ s/\s*\z//;
my @array = split /,/, $line;
my $key = shift @array;
$hash{$key} = \@array;
}
close $fh;
user80168