in reply to Re^8: Not able to replace element value using XML::Twig
in thread Not able to replace element value using XML::Twig

Strange. You might try the following:

perl -Dt -m"XML::Twig" -e ''

This only works if your perl is compiled with debugging enabled, but if it is, you will see a lot of debugging output, most lines preceded with the filename of the module perl is executing. Check that the Twig.pm you found is the Twig.pm named in most of these lines

If it is, you also might try the following command:

perl -Dx -m"XML::Twig" -e '' 2>&1 | grep print_to # should print: SUB XML::Twig::print_to_file = {

This shows that the subroutine print_to_file is really parsed

If you get both of above results, you might check the source code of your script whether there are invisible characters or a typo. You also could test this by copy-and-pasting the following line which should produce a 'cannot create file' error:

perl -m"XML::Twig" -e '$twig=XML::Twig->new(); $twig->print_to_file() +'