local $_; foreach (@array) {    $_ =~ s/^<%\s*(\w+)\s*%>$//g;    if ( exists($HASH{$1}) ) {        # Ersetze    } }