in reply to Re^2: diamond operator question
in thread diamond operator question

Orthagonality with the C opendir(2) and friends would be my guess. If it really mattered to you you probably could implement a tied filehandle that provided its own map from readline to readdir without too much trouble.

Update: Yeah, not too much trouble at all.

#!/usr/bin/perl use strict; package Tie::Dirfile; use IO::Dir (); sub TIEHANDLE { my $class = shift; my $self = {}; $self->{_dir} = shift; $self->{_handle} = IO::Dir->new( $self->{_dir} ); return bless $self, $class; } sub READLINE { return shift()->{_handle}->read; } sub CLOSE { return shift()->{_handle}->close( ); } package main; local( *DH ); tie *DH, 'Tie::Dirfile' => "/bin" or die "Can't create Tie::Dirfile for /bin: $!\n"; my $i = 0; print $i++, ": ", $_, "\n" while( <DH> ); close( DH ); exit 0; __END__

--
We're looking for people in ATL