my %filehash = ("First Case"=>[], "Second Case"=>[], "Third Case"=>[], "Fourth Case"=>[]); #### foreach my $file (@files) { if () { push($filehash{"First Case"},$file); } }