in reply to Re: Reading a array
in thread Reading a array
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]} +; } } . .
|
|---|