On Jul 8, 2012, at 2:08 PM, Carl Friedberg wrote:

> Hi,
> 
> I'm sure I've missed something, and am about to do serious googling,
> but does anyone here happen to know how to encourage the print
> statement not to break lines at 132 chars?
> 
> I have a 200-characacter string  $y that I want to write to a file,
> but if I do this:
> 
> open XML, "> something.xml"
> 
> print XMLO '<',$x,'>',$y,'</',$x,'>',"\n";
> 
> the print commands inserts a hard return after each 132 characters.


I cannot reproduce this with either 5.12.3 or with blead, even if I create the 
file first with DCL and then create a new version with Perl.  I'm doing the 
following:

open XML, "> something.xml";
my $x = 'tag';
my $y = 'W' x 200; 
print XML '<',$x,'>',$y,'</',$x,'>',"\n";

So something is different about your environment or what you're doing.  Are you 
sure there are no embedded newlines in $y?

________________________________________
Craig A. Berry
mailto:craigbe...@mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to