sub smart_match { my ($target, $param) = @_; if (ref $param eq 'Regexp') { return ($target =~ qr/$param/) } if (ref $param eq 'ARRAY') { return grep { smart_match($target, $_) } @$param } return ($target eq $param); } # ... next unless smart_match($key, [qw/subnet gateway cidr netmask/]);
In reply to Re^2: Struggling with XML
by tobyink
in thread Struggling with XML
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |