Re: [CGI] Interesting Chop question.

2001-12-12 Thread Darren Duncan
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

Re: [CGI] Interesting Chop question.

2001-12-12 Thread Andre` Niel Cameron
http://supportmanual.com/ - Original Message - From: "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]> To: "Andre` Niel Cameron" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, December 12, 2001 11:38 AM Subje

Re: [CGI] Interesting Chop question.

2001-12-12 Thread Jeff 'japhy' Pinyan
On Dec 12, Andre` Niel Cameron said: >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 somet

Re: [CGI] Interesting Chop question.

2001-12-12 Thread SOARES Philippe
I think using chomp instead of chop should do it... there should be no need for test. Philippe Soares Andre` Niel Cameron a écrit : > Hi, > > 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 > the

Re: [CGI] Interesting Chop question.

2001-12-12 Thread sherzodR
Ok, if you just want to get rid of a trailing space, use chomp() function instread of chop(). Coz chop() trims the the last character, and chomp() trims the record seperator ( $/ ) which is by default a new line that keeps giving you pain :-) Andre` Niel Cameron wrote: ANC: Date: Wed, 12

RE: [CGI] Interesting Chop question.

2001-12-12 Thread Hershey, Ernie
Use chomp(), which is just like chop() but will only remove the character if it's equal to the $/ variable (which is \n by default). Ernie Hershey > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf > Of Andre` Niel Cameron > Sent: Wednesday, Dec