Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by Jenda (Abbot)
on Sep 30, 2010 at 07:56 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-26 00:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found