my $yesterday = &read_benchmark(); ... &print_report($yesterday); ... sub print_report { my ($yesterday) = @_; # Rest of function the same. }