How to print a Perl 2-dimensional array?
- by Matt Pascoe
I am trying to write a simple Perl script that reads a *.csv, places the rows of the *.csv file in a two dimensional array, and then prints on item out of the array and then prints a row of the array.
#!/usr/bin/perl
use strict;
use warnings;
open(CSV, $ARGV[0]) || die("Cannot open the $ARGV[0] file: $!");
my @row;
my @table;
while(<CSV>)…