in reply to Re^2: Merging of arrays with space
in thread Merging of arrays with space
I don't understand why you are doing split twice (first for the row and then for the column).
If you just want to return a given column from a CSV you could do it simply with:
assuming there isn't any escaped csv-values such asmy @result = map { my @row = split /,/ => $_; $row[$column_number] } @lines;
a,b,"hello, world",c,d
|
---|
In Section
Seekers of Perl Wisdom