-#!/local/sun4/bin/perl
#
# Subroutines to parses a ghc Garbage Collection stats file
#
local($statsfile, $line, $row, $col, $val);
local(@stats, @hdr1, @hdr2, @line_vals);
local(%the_stats);
+ local(*STATS);
- open($statsfile, $filename) || die "Cant open $filename \n";
- @stats = <$statsfile>;
+ open(STATS, $filename) || die "Cant open $filename \n";
+ @stats = <STATS>;
do {$line = shift(@stats);} until ($line !~ /^$/);
chop($line);
print STDERR "Unmatched line: $_";
}
- close($statsfile);
+ close(STATS);
%the_stats;
}