$mw->repeat(1000, \&status_bank); sub status_bank{ ......... do your extraction from file $mw->update; }