#!/usr/bin/perl use strict; use warnings; open my $fh, '<', "/tmp/Gene.txt" or die $!; my @content = (<$fh>); close($fh); my @myArray; for my $row (@content) { my @columns = split '\t', $row; push @myArray, \@columns; } my $title_row = shift @myArray; for my $row (@myArray) { my $sum = 0; for ( @$row ) { $sum++; } print "$row->[0] is $sum\n"; print join( '; ', @$row ); }