You get 7. As far as I know, the "\n" -> "\r\n" conversion only occurs when
you write to a file. The string in Perl is the same and stays the same.
-----Original Message-----
From: Ron Newman [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 05, 2001 3:18 PM
To: Fernando Trias
Cc: Frank Speiser; [EMAIL PROTECTED]
Subject: RE: [Boston.pm] New Line
On Mon, 5 Feb 2001, Fernando Trias wrote:
> But on Windows, if you print "\n", it will write out a <cr><lf>. To
prevent
> that, use "binmode".
I've never used Windows. But if I did, and I said
my $s = "abc\ndef";
print length($s);
would I get 7, or 8? Wouldn't this cause real problems for
the substr() function?
--
Ron Newman [EMAIL PROTECTED]
URL: http://www2.thecia.net/users/rnewman/