[50a3f7]: / modules / RawDB / scripts / matrix.pl

Download this file

25 lines (19 with data), 466 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl
use strict;
use warnings;
use Text::CSV;
my @data; # 2D array for CSV data
my $file = 'tokenCancer.csv';
my $csv = Text::CSV->new;
open my $fh, '<', $file or die "Could not open $file: $!";
while( my $row = $csv->getline( $fh ) ) {
#shift @$row; # throw away first value
push @data, $row;
}
foreach my $row (@data) {
foreach my $element (@$row) {
print $element, ' '
}
print "\n"
}
#print $data[0][1], "\n";