--- Foo.pm --- package Foo; use strict; use vars qw(@ISA @EXPORT @EXPORT_OK); require Exporter; my $z = 1; @ISA = qw(Exporter); @EXPORT_OK = qw ($z); 1; --- test.pl --- use Foo qw(z); print $z;