in reply to Re: Reading a array
in thread Reading a array

Further to davorq's most apposite observation, even if $_ had been defined, the $_ =~ is redundant since $_ =~ /RE/ and /RE/ are exactly equivalent.

You might also want to use the standard strictures and warnings.

I'm guessing something like this might be a little closer to what you want (to check that, for each tag in a list of tags, the tag body can be found in a named array of valid tag names - or some such) ...

use strict; use warnings; . . sub validate_tag { # Assume tags passed as arg list while("@_" =~ /<(.+?)>/g) { print "Invalid tag $1 found" unless grep /(:?$1)/, @{$ARGV[1]} +; } } . .

A user level that continues to overstate my experience :-))