Perl, export variable from module

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-05-26T01:28:50Z Indexed on 2010/05/26 1:31 UTC
Read the original article Hit count: 436

Filed under:
|
|

How can I export a Hash from a Perl module?

ie,

mod.pm
======

%a={1=>2};

test.pl
=======

use mod;

print $a{1};

=====
output 2

© Stack Overflow or respective owner

Related posts about perl

Related posts about module