$ perl -e 'print "\r"' | perl -e '$_=<>; print "got CR\n" if (/\r/)' | od -t xC -a 0000000 67 6f 74 20 43 52 0a g o t sp C R nl