for my $db (keys %{$db_ds}) { ...figure out which table to dump, etc... system("$cmd > $dumpfile &"); }