use MyPack; use strict; my $obj = MyPack->new(); $obj->foo(); $obj->changeFoo(); $obj->foo();