At 10:12 AM 8/8/00 -0700, Larry Wall wrote:
>Ted Ashton writes:
>: Thus it was written in the epistle of Segher Boessenkool,
>: >
>: > The magic defined($_ = <FILE>) only happens if <FILE> is the only thing
>: > inside while().
>: >
>: > In this case, it's not (there's a chomp() inside as well), so the magic
>: > doesn't apply.
>:
>: Ok.  One more time . . .
>:
>:   I'm proposing that we change that.
>
>Before we get too carried away discussing the syntax of chomp, let's
>look a bit at the semantics.  What's chomp supposed to work on if we
>make $/ go away?  I think any discussion of chomp without considering
>how the input discipline finds line terminators is destined to be a
>partial solution.  If chomp exists in Perl 6 at all, I think it would
>have to be some kind of method call on the string that figures out what
>the discipline determined to be the terminator *for the current line*.

Which brings up the questions:

* What about scalars that didn't come from filehandles?
* Should the chomp function use the filehandle's current separator, or the 
one in effect when it was read?
* Do we even want to allow after-the-fact chomps, or do it automagically at 
read time?
* Is it worth the extra space per scalar to store the record separator (or 
a pointer to the filehandle holding the record separator)?

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to