$ 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' };
In reply to Hash (not) returned by subroutine by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |