in reply to CGI: Premature end of script headers

Looking at your code below, all you want to do is to find out how many *.infotmp* files there are under $memberinfo directory.
opendir (DIR, "$memberinfo"); @file = grep { /.infotmp/ } readdir(DIR); close (DIR); $new_files = push(@file);

You could replace all that with a one-liner:
$new_files = @{[<$memberinfo/*\.infotmp*>]};