package Module; use warnings; use strict; use vars qw(@ISA @EXPORT_OK ); @ISA = qw(Exporter); # inherit the import() from Exporter.pm @EXPORT_OK = qw(); # list of things to export if asked to sub import(\@_) { print "You gave me (@_ )\n"; print "$_[0] $_[1]\n"; } 1; #### #!/usr/bin/perl BEGIN { unshift(@INC,'.')}; $|=1; my $pid = $$; use Module($pid); # I can pass a constant here, but no $pid print "ztest->$$\n"; while(1){ print 1; sleep 1; }