in reply to Re: Returning data from a sub routine in a module.
in thread Returning data from a sub routine in a module.

I see that you called account() from inside of results(), but I still have to pass my $file = "test.txt"; to account().

Replies are listed 'Best First'.
Re^3: Returning data from a sub routine in a module.
by stevieb (Canon) on Apr 19, 2016 at 20:16 UTC

    I updated my post. The results() sub accepts a file name from the script, then it passes it to accounts() for processing, and then returns the results.

      The reason I posted was because I do not want to pass the my $file = "accounts.txt"; from the Perl script. I am trying to have it in the module:
      my $file = "test.txt"; my $accounts = account( file => $file, );