in reply to Problem Declaring Variable

I think you should pass $today and $yesterday to the print_report subroutine: print_report($today, $yesterday);

The same should be done with write_benchmark, you should pass the hash reference to the sub instead of relying on a global variable: write_benchmark($today);

Your programs will be more readable, maintainable, and scalable.

Inside print_report, access them like this:

sub print_report { my ($today, $yesterday) = @_; }