if(my @fh_list = $cgi->upload('upload_file')) { for my $fh ( @fh_list ) { while(<$fh>) { # ... } } }