#--------------------------------------------------------- # Foo_1.pm use strict; use warnings; package Foo; my $HELLO='elloHay'; our $GOODBYE ='oodbyeGay'; sub hello { "hi! $HELLO -> $GOODBYE"; } 1; #--------------------------------------------------------- # Foo_2.pm use strict; use warnings; package Foo; # You are right Tilly - "our" doesn't reset $GOODBYE # and strict won't complain about an unqualified our # variable so long as we declare it our $GOODBYE; print "GOODBYE=$GOODBYE\n"; # no compiler complaints from above line # outputs: GOODBYE=oodbyeGay $Foo::HELLO='Bonjour'; #this is OK $Foo::GOODBYE='Au revoir'; #this is OK print hello() . "Hello=$Foo::HELLO, Goodbye=$Foo::GOODBYE\n"; # in the hello() sub HELLO and GOODBYE are both unqualified. # the my variable(HELLO) retains its old value, but the our # variable (GOODBYE) reflects the new value because with # or without qualification it is global (in the package table) #outputs: hi! elloHay -> Au revoir: Hello=Bonjour Goodbye=Au revoir #NOT hi! elloHay -> oodbyeGay: Hello=Bonjour Goodbye=Au revoir #NOR hi! Bonjour -> Au revoir: Hello=Bonjour Goodbye=Au revoir