i am doing my first steps with writing packages/modules and of course there are problems:
the module holds a variable in a subroutine. this variable i like to pass to the callerprogram,
so it is in the @EXPORT_OK and even in the @EXPORT. So far so good, i thought!
but nothing happens when i run the caller-program...
i tried also defining with 'my ..' , or without 'use strict' ...
somebody has the clue?
thanx -ralf
the module 'testMod.pm'' #================================== package testMod; use strict; use Exporter; our @ISA = ("Exporter"); our @EXPORT = qw($test &testThis); our @EXPORT_OK = qw($test &testThis);
sub testThis{ our $test = "test";} 1;
the caller-program 'test.pl' #================================== use lib "E:/ddswork/process_data/_makeLevel2"; use testMod qw(&testThis $test); use strict;
print "1: $testThis::test\n"; print "2: $test\n";
==> nothing is printed...
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>