for (my($file,$data) = each %returnedhash) { open my $f, ">", $file or die "$!"; print $f $data; }