perl -e 'print "pl\r\n"' > /tmp/j.txt perl -e 'open(I,"/tmp/j.txt");$/=undef;$_=; print ". matches CR on $^O\n" if(/p.{2,6})'