in reply to Hashes of arrays populated from a Text File
use warnings; use strict; use Data::Dumper; my %Diag; while (<DATA>) { my ($name, $val) = split; push @{ $Diag{$name} }, $val; } print Dumper(\%Diag); __DATA__ Name1 1234 Name2 9999 Name1 5514 Name3 5415 Name2 6419
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hashes of arrays populated from a Text File
by Raya4505 (Novice) on Feb 26, 2014 at 15:36 UTC | |
by Bloodnok (Vicar) on Feb 26, 2014 at 16:49 UTC | |
by hdb (Monsignor) on Feb 26, 2014 at 15:46 UTC | |
by Raya4505 (Novice) on Feb 26, 2014 at 17:23 UTC | |
by Raya4505 (Novice) on Feb 26, 2014 at 16:42 UTC | |
by toolic (Bishop) on Feb 26, 2014 at 16:46 UTC | |
by karlgoethebier (Abbot) on Feb 26, 2014 at 16:56 UTC |