#### Globals.pm package Globals; use Exporter; our @ISA = 'Exporter'; our @EXPORT_OK = qw( %tn %ti %bn); #### Main.pm use Globals qw(%tn %ti %bn); *tn = \%Track::by_name; *ti = \%Track::by_index; *bn = \%Bus::by_name; #### ChainSetup.pm package ChainSetup; use Globals qw(%tn %ti %bn); print $tn{Master}->name; # can't do method 'name' on undef