in reply to Re: Variables from modules
in thread Variables from modules

That didn't do it either. I'm still getting the same error. test.pm now looks like this:
package vars; use strict; our $foo = "test"; 1;

Replies are listed 'Best First'.
Re^3: Variables from modules
by Anonymous Monk on Sep 16, 2004 at 14:16 UTC
    er.
    package test;
    was thinking of something else while typing.
      It works for me.
      $ cat test.pm use strict; package test; our $foo = "test"; 1; $ cat p #!/usr/bin/perl -w use strict; use lib "."; use test; print $test::foo ."\n"; $ ./p test $

      Dave.

      Try renaming your package. There's a standard module called Test, and you're probably picking that one up.