in reply to Problem populating Hash (I think?)
Note: This modifies both @rows, and @values - I'm assuming you don't need these after the info is extracted.my (undef,undef,@fields) = split(/\,/,shift @rows); my %stats = (); for my $r(@rows){ my ($pxname,$svname,@values) = split /\,/,$r; for my $f(@fields){ $stats{$pxname}{$svname}{$f} = shift @values; } }
“PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil perpetrated by skilled but perverted professionals.”
― Jon Ribbens
|
|---|