Hi,
The code is,
while (<DATA>) { chomp; my @a=split/\s+/; push @{$h{$a[0]}},$a[1]; } $"="\t"; print "$_\n@{$h{$_}}\n\n" for sort keys %h; __DATA__ log1 123 log1 233 log1 223 log2 465 log2 231 log2 456
In reply to Re: key and values help
by murugu
in thread key and values help
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |