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:
Is there some way to make this work like that?if (grep { $_ eq $zero_arg} @ARRAY) && {$_ ne $sec_arg} @anotherarray) + #Then do command.
Originally posted as a Categorized Question.
Back to
Seekers of Perl Wisdom