On Wed, 12 Dec 2001, Andre` Niel Cameron wrote: > I have a pain in the butt array that SOMETIMES has a CR at the end and > sometimes does not. Can anyone think of a way to test to see if the \n is > there and if it is then chop else no chop? Cause if I just use chop then it > starts chopping off letters sometimes...
Try using "chomp" instead of "chop". The "chomp" function was designed to do exactly what you want - it removes an ending character only if it is the likes of: newline, linefeed, carrige return, etc. So that's what I use all the time. By contrast, "chop" seems more like a carryover from older days when things were harder to do. -- Darren Duncan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]