my @chains = qw(INPUT OUTPUT FORWARD); # use @chains as hash keys for %chains_h; my %chains_h; @chains_h{@chains} = (1) x @chains; my @rules = open_file($rules); for (@rules) { if ($chains_h{$_}) { print "found $_"; } }
In reply to Re: Multiple Array Loops
by moritz
in thread Multiple Array Loops
by k_grdn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |