develooper Front page | perl.golf | Postings from June 2008

Re: =?UTF-8?B?562U5aSNOiBBIGNoYWxsZW5nZSB0byBleHBsYWluIHRoZSBzdHI=?==?UTF-8?B?YW5nZSByZXN1bHRzICh1bmRlciBsaW51eCk=?=

Thread Previous
From:
Daniel Tiefnig
Date:
June 12, 2008 09:56
Subject:
Re: =?UTF-8?B?562U5aSNOiBBIGNoYWxsZW5nZSB0byBleHBsYWluIHRoZSBzdHI=?==?UTF-8?B?YW5nZSByZXN1bHRzICh1bmRlciBsaW51eCk=?=
Message ID:
48512171.2020107@gmx.at
Zhu Shanshan wrote:
> As you said, when I substituted "s/\r\n$//" with "chomp", it did
> work. After looking up the explanation of "chomp" in perldoc, I found
> "chomp", which I always used to remove the newline previous, removes
> any trailing string that corresponds to the current value of "$/".

Hej,

JFTR, you may also want to have a look at "perldoc perlport". The first
issue discussed is "Newlines".

lg,
daniel

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About