my @data = map { [split /,/] } <>;
You might want a chomp in there to avoid leaving the line terminator in the last field.
my @data = map { chomp; [split /,/] } <>;
I second your *sigh* by the way.
Cheers,
JohnGG
In reply to Re^4: Getting columns from csv file in perl
by johngg
in thread Getting columns from csv file in perl
by pnsreee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |