The bloody ^M character stems from a everybody having their own way of
terminating a line.  In the days of the typewriter, you had to have a
new line and then a carriage return.  Well, in winders that's still how
they do things.  They end their lines with \n\r which is newline -
carriage return.  Very pesky under *nix.  Solution?  Just parse for the
\r's and it should solve your problem.  I've seen this a lot when using
text boxes off a web page that were not set to soft wrap.  But, anyway,
something like this should work for you:

s/\r$//;

Brian Johnson
Partner/Systems Administrator/Programmer
Source1Hosting.tv, LLC (www.source1hosting.tv)
Source1Results.com, LLC (www.source1results.com)
I may be insane, but remember - The only
difference between an insane man and a
genius is his jacket.

> 
> 
> This is for newbies, right? Can anyone tell me why a s/^M//g 
> won't get rid of the annoying ^M on the end of each line of 
> an imported Paradox database? Is there a better way? I know 
> this has to be simple, yet I can find no reference in my 
> plethora of Perl books.
> TIA for any and all help - you guys are great and I 
> appreciate the time you all put into this effort to help 
> folks like me :-)
> 


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

Reply via email to