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"; } }
In reply to Re^5: perl parsing
by poj
in thread perl parsing
by cbtshare
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |