12 my $file = "crlf$$.dat";
17 if (find PerlIO::Layer 'perlio') {
19 ok(open(FOO,">:crlf",$file));
20 ok(print FOO 'a'.((('a' x 14).qq{\n}) x 2000) || close(FOO));
21 ok(open(FOO,"<:crlf",$file));
24 { local $/; $text = <FOO> }
25 is(count_chars($text, "\015\012"), 0);
26 is(count_chars($text, "\n"), 2000);
30 { local $/; $text = <FOO> }
31 is(count_chars($text, "\015\012"), 2000);
36 skip_all("No perlio, so no :crlf");
40 my($text, $chars) = @_;
42 $seen++ while $text =~ /$chars/g;