On Mon, 6 Jun 2005, Offer Kaye wrote: > On 6/6/05, Nupur Pande wrote: > > The interesting thing is "chomp"ing twice did not > > seem to help either. > > Of course not. "chomp" removes "$/" only, and unless you changed it, > it is equal (on Linux) to "\n".
Right. chomp() once or chomp() 100 times will have the same result. Nupur may be thinking of chop(), which just removes the last character; calling it more than once will keep truncating the string, no matter whatthe trailing character is. Note though that multiple chop() calls often won't be what you wanted, and that you're better off updating $/ to get chomp() to behave than to just use chop()chop() and hope for the best... -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>