$file=$_; while() { $file =~ /<([^>].+)>/g; die "Incorrect entry $1\n" unless grep { $_ eq $1 } @tags; } #### Incorrect entry Defining Marketing for the 21st Century