Dan Sugalski said: > > > * Do we even want to allow after-the-fact chomps, or do it automagically > >at read time? > "Yes" is rather ambiguous. To clarify: "Yes", we (I) want to allow after-the-fact chomps. As you alluded to yourself there are times when you may want to chomp strings that were not read from files, therefore there would be no "read time". > >What about a > > chomp($foo, '\r\n'); > > # or > > chomp(<FH>, '\r\n'); > >syntax. > > Looks an awful lot like: > s/\r\n//; > to me... Yep. It should-- that's all chomp does afterall. The difference is that the proposed chomp should be smarter than a regex, since it will assume certain defaults, that is: "chomp;" should act like "chomp($_, $/)"; If, however you wanted to explicitly say something different you could. --Michael
- RFC 58 (v1) C<chomp()> changes. Perl6 RFC Librarian
- Re: RFC 58 (v1) C<chomp()> changes. Bart Lateur
- Re: RFC 58 (v1) C<chomp()> changes. Ted Ashton
- Re: RFC 58 (v1) C<chomp()> changes. Segher Boessenkool
- Re: RFC 58 (v1) C<chomp()> chan... Ted Ashton
- Re: RFC 58 (v1) C<chomp()>... Larry Wall
- Re: RFC 58 (v1) C<chomp()... Larry Wall
- Re: RFC 58 (v1) C<chomp()... Dan Sugalski
- Re: RFC 58 (v1) C<cho... Michael Mathews
- Re: RFC 58 (v1) C<cho... Dan Sugalski
- Re: RFC 58 (v1) C<cho... Michael Mathews
- Re: RFC 58 (v1) C<cho... Uri Guttman
- Re: RFC 58 (v1) C<cho... Ted Ashton
- Re: RFC 58 (v1) C<cho... Uri Guttman
- Re: RFC 58 (v1) C<cho... Ted Ashton
- Re: RFC 58 (v1) C<cho... Mike Pastore
- Re: RFC 58 (v1) C<cho... Mike Pastore
- Re: RFC 58 (v1) C<cho... Michael Mathews
- Re: RFC 58 (v1) C<cho... John Porter
- Re: RFC 58 (v1) C<cho... Dan Sugalski
- Re: RFC 58 (v1) C<cho... John Porter