[ale] perl help

Tommie M. Jones tj at atlantageek.com
Fri Apr 12 11:20:46 EDT 2002


I'm not sure how to specify control characters in regular expressions.
But you can usually assume that every line's last character is a \r
So as a quick fix that works even when you are not on your own system I
load it into VI and type the following:

:1,$ s/.$//

Replaces the last character (\n is not the last character) with nothing.


---------------------------
'Business Intelligence' is not an Oxymoron - http://www.intelliforge.com


On Fri, 12 Apr 2002, Matthew Brown wrote:

> I need to switch out the \r\n 's with \n 's on a bunch of files from
> Windows so I can easily use them in Linux.  SO, now I have two
> questions:
> 1.    What happened to that dos2unix util?
> 2.    How can I easily do this in Perl?
>
> Thanks, all!
>
>
> Best regards,
> Matthew Brown, President
> CorData, Inc.
> O: (770) 795-0089
> F: (404) 806-4855
> E: matthew.brown at cordata.net
>
>


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list