my $stats = $htmlcontent; @rows = split(/\n/,$stats); #Debug Line - prints the cleaned up data after dumping it to an array #foreach (@rows) { # print "ROW DATA : $_\n"; #} #Make sure 'good' data is pulled if ( $rows[0] !~ m/Function Name/ ) { $np->nagios_exit("UNKNOWN", "Can't find csv header!\n"); exit $ERRORS{"UNKNOWN"} } 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; } }