tracing: Use appropriate perl constructs in recordmcount.pl