[project @ 2004-01-09 12:36:54 by simonmar]
[ghc-hetmet.git] / ghc / utils / stat2resid / parse-gcstats.prl
index 3b5dab5..d882ee6 100644 (file)
@@ -1,4 +1,3 @@
-#!/local/sun4/bin/perl
 #
 # Subroutines to parses a ghc Garbage Collection stats file
 #
@@ -36,9 +35,10 @@ sub parse_stats {
     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);
@@ -181,7 +181,7 @@ arg: while($_ = $stats[0]) {
     print STDERR "Unmatched line: $_";
     }
 
-    close($statsfile);
+    close(STATS);
     %the_stats;
 }