how do I close the dialog and at the same time run a subroutine in the background

I want to destroy the dialog and call a subroutine when I click the
"yes" button,here is part of my code ,but it doesn't work well,the
dialog is closed until the subroutine is finished.waiting for your

here is part of my code:
my $dialog =Gtk2::MessageDialog->new
  ($window,'destroy-with-parent','something to confirm','yes-no',");
  my $response = $dialog->run;
  if($response eq "yes"){

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]