# first instance sub magic1 { ... } my $obj1 = Find::Files( 'function' => \&magic1 ); # let's do some magic! $obj1->find_and_call_function('/tmp'); # ------------------------------------------------ # second instance # can be in the same file or in another module sub magic2 { ... } my $obj2 = Find::Files( 'function' => \&magic2 ); # let's do some other magic! $obj2->find_and_call_function('/tmp');