Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace Windows Control Characters (^M)

Status
Not open for further replies.

aj2taylo

Programmer
Nov 4, 2002
17
CA
Hello,

I'm wondering how in a Perl script I can do a search/replace on windows control characters (^M). I've seen how to do this in vi, but not sure how to integrate into my script.

Thanks
 
$string=~s/\r//go;

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top