in reply to Re^4: perl parsing
in thread perl parsing
Change this line to build a Hash of Arrays (HoA)
#push @{$hash{$name}},$col2,$col3; push @{$hash{$name}},"$col2\t$col3"; # device year
and change the output loop to
pojforeach my $name (keys %hash){ print "$name\n"; foreach my $sit (@{$hash{$name}}){ print "\t$sit\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: perl parsing
by cbtshare (Monk) on Oct 06, 2017 at 19:11 UTC | |
by poj (Abbot) on Oct 06, 2017 at 19:41 UTC | |
by cbtshare (Monk) on Oct 06, 2017 at 20:59 UTC | |
by poj (Abbot) on Oct 07, 2017 at 14:19 UTC |