Re: chomp & unchomp

2000-08-09 Thread David L. Nicol
With a regex you can get much finer control; with a "r" modifier for the regexen indicating that it should start at the end of the string instead of the beginning the speed issue is gone; i think unchop and unchomp is silly; that's what .= is for -- David Nicol 816.

Re: chomp & unchomp

2000-08-09 Thread Bart Lateur
On Wed, 9 Aug 2000 15:42:24 -0400, John Porter wrote: >Bryan C. Warnock wrote: >> >> Chomp removes one or more line separators from the end. > >It does? You're using a different version of Perl than I am. Try setting $/ to the empty string. (not undef!) -- Bart.

Re: chomp & unchomp

2000-08-09 Thread Bryan C . Warnock
On Wed, 09 Aug 2000, John Porter wrote: > Bryan C. Warnock wrote: > > > > Chomp removes one or more line separators from the end. > > It does? You're using a different version of Perl than I am. Sorry. You're correct. I was rolling the string, list, and paragraph mode removals all into one a

Re: chomp & unchomp

2000-08-09 Thread Dan Sugalski
At 03:36 PM 8/9/00 -0400, Bryan C. Warnock wrote: >On Wed, 09 Aug 2000, Ed Mills wrote: > > Here is the argument- > > > > Perl has (had?) chomp(). It removes \n at the end of a line. That's > > something we often need to do. We ALSO often need to ADD \n to the end > of a > > line. This usually lo

Re: chomp & unchomp

2000-08-09 Thread John Porter
Bryan C. Warnock wrote: > > Chomp removes one or more line separators from the end. It does? You're using a different version of Perl than I am. -- John Porter

Re: chomp & unchomp

2000-08-09 Thread Bryan C . Warnock
On Wed, 09 Aug 2000, Ed Mills wrote: > Here is the argument- > > Perl has (had?) chomp(). It removes \n at the end of a line. That's > something we often need to do. We ALSO often need to ADD \n to the end of a > line. This usually looks something like: > > print "$kitty\n"; Chomp removes o