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, December 12, 2001 11:23 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [CGI] Interesting Chop question.
> 
> 
> 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
> there and if it is then chop else no chop?  Cause if I just 
> use chop then it
> starts chopping off letters sometimes...
> 
> Regards,
> Andre` C.
> Technical Support
> ԿԬ
> --------------------------------------------------------------
> --------------
> -
> Visit our support manual at http://supportmanual.com/
> 
> -
> The CGI-LIST is sponsored by:
> DINNERBROKER.com!
> Fine dining up to 30% off!
> Exclusive access to tables!
> http://www.dinnerbroker.com/
> 
> This is the cgi-list mailing list:
> To unsubscribe, send email to:
> [EMAIL PROTECTED]
> with the body:
> unsubscribe cgi-list
> 
> No one may in any way attempt to data-mine or archive the
> mailing list for financial gain without the express permission
> of Jann.com.
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to