http://www.perlmonks.org?node_id=871896

begood321 has asked for the wisdom of the Perl Monks concerning the following question:

Instead of parsing spreadsheet for value I have decided to check variable value instead. I can't seem to get my value to pass from subroutine to subroutine call as seen below. I get values in logger reports1 but not in logger reports2.
@reports = &getValidTotals(); $logger->write_log("reports2: @reports", "INFO");. . . . . sub getValidTotals ($$) { my $reportGroup = $_[0]; my $total = $_[1]; my @reports = qw(); if ($reportGroup ne "") { push(@reports,$reportGroup); $logger->write_log("reports1: @reports, total: $total", "INFO"); } return @reports; }