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

Reply via email to