package Foo; use SharedVariables; sub Print { print "Foo Scalar1 $scalar1\n"; } sub Set { $scalar1 = 'Foo'; print "Set Foo\n"; } 1;