$query = CGI->new; @params = $query->param; foreach my $p (@params) { if( [$p is a file handle/input type == "file"] ) { [ read in from the file and do some stuff ] } else { [ do some other stuff ] } }