#!/usr/bin/perl use strict; use warnings; my %data; while () { chomp; my ($team, @field) = split; push @{ $data{$team} }, \@field; } #### #!/usr/bin/perl use strict; use warnings; use constant TEAM => 0; use constant POINTS => 1; use constant TALLIES => 2; use constant SCORES => 3; use constant METRICS => 4; my %data; while () { chomp; my @col = split; push @{ $data{$col[TEAM]}{POINTS} }, $col[POINTS]; push @{ $data{$col[TEAM]}{TALLIES} }, $col[TALLIES]; push @{ $data{$col[TEAM]}{SCORES} }, $col[SCORES]; push @{ $data{$col[TEAM]}{METRICS} }, $col[METRICS]; }