$max_num_files ||= 1; $Photo_Dir ||= $ENV{'DOCUMENT_ROOT'}; undef @bad_extensions if @good_extensions; for(my $a = 1; $a <= $max_num_files; $a++) { my $req = new CGI; ...