$ sed -b 's/\r//g' 892874.pl >t.pl $ perl t.pl ******************** hello world bye ******************** ******************** hello world2 bye2 ******************** ******************** end ********************