Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Please help how to access multiple hash variables defined in a module. I am not aware of the syntax for accessing the hash variables populated in a module from main file
<sample code>XYZ.pm ======= #!/usr/bin/perl package XYZ; @ISA = qw(Exporter); @EXPORT_OK = qw(%Hash1 %Hash2 %Hash3) sub populateHashRoutine { # open the file "raw_file.txt" # Populate %Hash1 %Hash2 %Hash3 } 1; main.pl ======== use XYZ; XYZ::populateHashRoutine("raw_file.txt"); How to print Hash1,Hash2,Hash3 values here ?
|
|---|