develooper Front page | perl.perl5.porters | Postings from November 1999

Re: [ID 19991119.003] chomp() can be confusing

Thread Previous | Thread Next
November 19, 1999 07:48
Re: [ID 19991119.003] chomp() can be confusing
Message ID:

> In message <>,
> writes:
> : Is there any possibility of having Perl's chomp() command be modified
> : recognize \n, \r, and \r\n as line-endings to chomp?  A source of nasty
> : confusion for people working in a cross-platform environment is when
> : identical Perl scripts give very different results on the same exact
> : depending on whether you are running under *nix or Windows.
> : an issue with Samba because people wind up reading under one system
> : created under the other.)
> Have a look at <URL:> for
> an example of how to do what you want (or at least something similar).

When I said, "I talked to" I meant that.  I don't need the pointer - I know
how to handle it.  But I wind up answering questions from people who do
not.  In my experience most of them use chomp() so the confusion is
preventable.  (After all you expect chomp() to get rid of line endings,


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About