package MyModule; use strict; # Case A use Exporter; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = (); #@EXPORT_OK = qw(func1 func2); @EXPORT_OK = qw(@rray); # %EXPORT_TAGS = ( DEFAULT => [qw(&func1)], # Both => [qw(&func1 &func2)]); # sub func1 { return reverse @_ } # sub func2 { return map{ uc }@_ } # Case B # use Exporter qw(import); # our $VERSION = 1.00; # our @ISA = qw(Exporter); # our @EXPORT_OK = qw(@rray); # All cases my @rray = (1, 2, 3, 4); 1; #### use strict; # case 1 # use MyModule; # print scalar(@rray); # case 2 # use MyModule; # print scalar(@MyModule::rray); # case 3 use MyModule qw(@rray); print scalar(@rray);