in reply to Problem Declaring Variable
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) = @_; }
|
|---|