http://qs321.pair.com?node_id=39880

dallok has asked for the wisdom of the Perl Monks concerning the following question: (strings)

I have two strings $zero_arg and $sec_arg. I wish to compare each one against a file (routers.txt and interfaceses.txt) respectively. If $zero_arg is a good name then I want it to check the interface name. If $zero_arg is not a good name then DIE.

This is how I have the checking so far. Can I AND two if statements? Such as:

if (grep { $_ eq $zero_arg} @ARRAY) && {$_ ne $sec_arg} @anotherarray) + #Then do command.
Is there some way to make this work like that?

Originally posted as a Categorized Question.