in reply to Re: Anomalous double spaced output from XML::Twig
in thread Anomalous double spaced output from XML::Twig

Yes I still have the problem that the output generated by twig_print_outside_roots (that is, the original XML) is generated with line endings as "\r\r\n" rather than the "\r\n" line endings that are conventional for windows.

I would guess that the parser is striping "\n" characters rather than $/, but that print is generating OS specific line endings. Given that *nix uses "\n" line endings it is unsurprising that the sample code produces correct output on a *nix system.

The problem remains, although I now understand why it is there somewhat. I still don't know how to fix it within XML::Twig.


DWIM is Perl's answer to Gödel
  • Comment on Re^2: Anomalous double spaced output from XML::Twig

Replies are listed 'Best First'.
Re^3: Anomalous double spaced output from XML::Twig (!$/)
by tye (Sage) on May 22, 2006 at 14:13 UTC

    You seem be under the mistaken impression that $/ is different on Windows than it is elsewhere. $/ is just "\n" (by default) everywhere.

    This problem would happen on Windows if the input is read in binmode but the output is written without binmode.

    - tye