my $object = new Test1( "foo"); $object->sub2(); print $object->getTxt();