in reply to High Density Data Aid - swapping specific combination of lines/columns repeatedly
my %hash; while (<$fh>) { chomp; my @data = split /\s+/; push @{$hash{$data[0]}}, @data[3,4]; } for my $key (sort keys %hash) { print join(' ', $key, @{$hash{$key}}), "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: High Density Data Aid - swapping specific combination of lines/columns repeatedly
by Renyulb28 (Novice) on Apr 13, 2011 at 18:48 UTC | |
by wind (Priest) on Apr 13, 2011 at 18:58 UTC | |
by Renyulb28 (Novice) on Apr 13, 2011 at 19:06 UTC | |
by wind (Priest) on Apr 13, 2011 at 19:13 UTC | |
by Renyulb28 (Novice) on Apr 13, 2011 at 19:45 UTC | |
by wind (Priest) on Apr 13, 2011 at 19:56 UTC |