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";

XMLO or just XML?  That makes it look like you're printing to a different 
filehandle from the one you've opened.

> the print commands inserts a hard return after each 132 characters.

What's your Perl version?  As Hein says, check the file format.

What happens if you say:

print XML '<'.$x.'>'.$y.'</'.$x.'>'."\n";

with dots instead of commas?  This will concatenate them all into a string and 
do a single I/O, as opposed to a separate I/O for each item in the list.

________________________________________
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