You should do s/\r\n/\n/g
In reply to Re: converting windoze end-of-line chars to unix by fundflow in thread converting windoze end-of-line chars to unix by d_i_r_t_y