in reply to Problem populating Hash (I think?)

Replace "my @fields" onwards with this code:
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; } }
Note: This modifies both @rows, and @values - I'm assuming you don't need these after the info is extracted.

            “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