| Subject: | Re: how to remove ^M character from every line |
|---|---|
| From: | Gunnar Hjalmarsson |
| Date: | Mon, 03 Sep 2007 21:42:07 +0200 |
| Newsgroups: | perl.beginners |
divya wrote: A file generated on Windows machine is used on linux m/c while scripting. A sample line from the file is as shown: //-------------------------------------------------------^M File name : project_name^M .....Now in the perl script how can I remove ^M without running the command dos2unix.
perl -pi -e 'y/\015//d' project_name
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Shell qw(mysqldump) and localtime., Adriano Ferreira |
|---|---|
| Next by Date: | Transform my algorithm in perl. Ideas?, Shams Fantar |
| Previous by Thread: | Re: how to remove ^M character from every line, Beginner |
| Next by Thread: | RE: how to remove ^M character from every line, Andrew Curry |
| Indexes: | [Date] [Thread] [Top] [All Lists] |