in reply to Re: XML-Twig paste
in thread XML-Twig paste

Yup, if you  warn  $root->cut; you'll get undef, naturally

sub cut { my $elt= shift; my( $parent, $prev_sibling, $next_sibling, $last_elt); # you can't cut the root, sorry unless( $parent= $elt->{parent}) { return; }

So whatever the reason is, its intended