in reply to Re: Struggling with XML
in thread Struggling with XML

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/]);
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Replies are listed 'Best First'.
Re^3: Struggling with XML
by agentorange (Sexton) on Oct 08, 2012 at 13:21 UTC
    tobyink thank you very much. There's a couple of things I'll need to study to ensure I've fully understood everything but I think I'm pretty much there with you assistance. Much appreciate all your input.