title: XML::Twig - Inplace editing
body: <p>I'm trying to append timestamp at the end of xdp file. I am using <a href="https://metacpan.org/pod/XML::Twig" rel="nofollow">XML::Twig</a>. On running the script timestamp (<code>&lt;testing&gt;4619314911532861&lt;/testing&gt;</code>) gets added at the end but the output is coming on STDOUT instead of <code>testdata.xdp</code>. What am I missing?</p>
  
  <p>Code:</p>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use warnings;
  use XML::Twig;
  
  my $twig=XML::Twig-&gt;new(pretty_print =&gt; 'indented');
  my $file = 'testdata.xdp';
  $twig-&gt;parsefile_inplace($file, '.bak');
  my $root= $twig-&gt;root;
  my @children= $root-&gt;children;
  
  foreach my $child (@children){
      my $eblg= new XML::Twig::Elt( 'testing', localtime);
      $eblg-&gt;paste( 'last_child', $child);
  }
  
  $twig-&gt;flush; 
  </code></pre>