Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$ cat test.pl use strict; use lib ('.'); use Test qw (get_data); use Data::Dumper; my $result = get_data(); print Dumper $result; $cat Test.pm package Test; use strict; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(); our @EXPORT_OK = qw( get_data ); #------------- sub get_data { my $data = {a=>'b'}; } 1; $ perl test.pl $VAR1 = { 'a' => 'b' };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hash (not) returned by subroutine
by soonix (Chancellor) on Jan 27, 2020 at 09:58 UTC | |
|
Re: Hash (not) returned by subroutine
by tobyink (Canon) on Jan 27, 2020 at 12:06 UTC | |
by choroba (Cardinal) on Jan 27, 2020 at 16:15 UTC | |
by karlgoethebier (Abbot) on Jan 27, 2020 at 21:27 UTC | |
by afoken (Chancellor) on Jan 27, 2020 at 23:41 UTC |