6 require Config; import Config;
7 if (not $Config{'d_readdir'}) {
18 $dot = new DirHandle ($^O eq 'MacOS' ? ':' : '.');
23 do { $first = $dot->read } while defined($first) && $first =~ /^\./;
24 ok(+(grep { $_ eq $first } @a));
26 @b = sort($first, (grep {/^[^.]/} $dot->read));
27 ok(+(join("\0", @a) eq join("\0", @b)));
30 @c = sort grep {/^[^.]/} $dot->read;
31 cmp_ok(+(join("\0", @b), 'eq', join("\0", @c)));
35 ok(!defined($dot->read));