Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: XML::Rules: Can hierarchy be changed?

by Jenda (Abbot)
on Sep 30, 2010 at 07:56 UTC ( #862761=note: print w/ replies, xml ) Need Help??


in reply to Re: XML::Rules: Can hierarchy be changed?
in thread XML::Rules: Can hierarchy be changed?

sub { $_[1]->{text} = $_[1]->{_content}, delete $_[1]->{_content}, ret +urn ($_[0] => [$_[1]] , [$_[0] => $_[1]])}
is better written as
sub { $_[1]->{text} = $_[1]->{_content}; delete $_[1]->{_content}; ret +urn ($_[0] => [$_[1]] , [$_[0] => $_[1]])}
You can put several statements into an anonymous subroutine so no need to use commas where you mean semicolons :-)

Jenda
Enoch was right!
Enjoy the last years of Rome.


Comment on Re^2: XML::Rules: Can hierarchy be changed?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://862761]
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: (13)
As of 2014-12-19 13:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (83 votes), past polls