C:\temp>cat -A foo.txt foo$ bar$ baz$ C:\temp>perl -le "chomp(@a=<>);print for map qq|<$_>|, @a" foo.txt | cat -A ^M$ ^M$ ^M$