sub hello { print "Hello!\n"; } $pm->run_on_finish(\&hello);