in reply to Re^4: Load a file into hash with duplicate keys
in thread Load a file into hash with duplicate keys
Try this instead:my $key = (split/\t/, $line)[0]; push @{ $hash2{$key} }, $line;
my ($val, $key) = split /\t/, $line; push @{ $hash2{$key} }, $val;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Load a file into hash with duplicate keys
by Anonymous Monk on Nov 02, 2010 at 21:06 UTC | |
|
Re^6: Load a file into hash with duplicate keys
by sophix (Sexton) on Nov 02, 2010 at 21:12 UTC | |
by Anonymous Monk on Nov 02, 2010 at 21:14 UTC | |
by sophix (Sexton) on Nov 02, 2010 at 21:29 UTC |