Try if ($ParentNodeId > 1) { instead of if ($ParentNodeId gt 1) {. Replace eq with ==.
Then replace the split line withmy @field_names = qw/ ParentNodeId NodeId level canode label theme tem +plate /; # and so on for the rest
Then when you set the attributes on the XML::Twig::Elt, you can simply say:my %attributes; @attributes{ @field_names } = split /,/, $line;
$esec->set_att( %attributes );
In reply to Re: Need help with XML::Twig, something strange is happening!!
by rhesa
in thread Need help with XML::Twig, something strange is happening!!
by stevee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |