Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Struggling with XML

by tobyink (Abbot)
on Oct 08, 2012 at 12:58 UTC ( #997811=note: print w/ replies, xml ) Need Help??


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'


Comment on Re^2: Struggling with XML
Download Code
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997811]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-10-24 07:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (130 votes), past polls