If you always know it will be a \n, then you can do
$str =~ tr/\n//d;

-----Original Message-----
From: Rory O'Connor
To: [EMAIL PROTECTED]
Sent: 8/25/2001 10:13 AM
Subject: Re: Stripping line breaks

thanks all for your help.  It is my understanding that chomp($var); will
only strip the \n from the end of a string.  I'm dealing with strings
that could potentially be littered with newline characters.  I have an
o'reilly perl book, but it's not super clear on how to strip *all*
newline characters out of a string, no matter where they are.  am i
right in assuming regex needed for this?

Thanks!

providing the finest in midget technology
 <<Re: Stripping line breaks>>  <<ATT3578377.txt>> 

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

Reply via email to