my %foos; while (<>) { my ($foo, @bars) = split; $foos{$_} = $foo for @bars; } print("$foos{$_}\t$_\n") for sort { $a <=> $b } keys %foos;
Update: Fixed keys @foos.
In reply to Re: Stack table columns with hash of arrays
by ikegami
in thread Stack table columns with hash of arrays
by robertkraus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |