Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
# modulo accounts #!/usr/bin/perl use strict; use warnings; my $file = "test.txt"; my $accounts = account( file => $file, ); results( data => $accounts, ); sub account { ... return \@account; } sub results { ... my $results = \@data; return $results; } 1;
Thanks for the help!# script account.pl #!/usr/bin/perl use strict; use warnings; use Data::Dumper; use accounts; my $newdata = results(); print Dumper $newdata;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Returning data from a sub routine in a module.
by toolic (Bishop) on Apr 19, 2016 at 19:39 UTC | |
by Anonymous Monk on Apr 19, 2016 at 19:45 UTC | |
|
Re: Returning data from a sub routine in a module.
by stevieb (Canon) on Apr 19, 2016 at 19:54 UTC | |
by Anonymous Monk on Apr 19, 2016 at 20:08 UTC | |
by stevieb (Canon) on Apr 19, 2016 at 20:16 UTC | |
by Anonymous Monk on Apr 19, 2016 at 20:54 UTC |