Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    }
    
    die "Too many counts" if @counts;
    
  2. or download this
          my $new_text = $node->textContent() x shift(@counts);
          $node->removeChild($_) for $node->findnodes('text()');
          $node->appendText($new_text);