foreach my $regex (@regexes){ ($fileBodyMatch, $decode ) = checkFileBody ($file, $regex->{bodyregex}); }