http://qs1969.pair.com?node_id=173118


in reply to localizing handles with anonymous subroutines


Is there an advantage of this method over do?
my @files = do { local *DH; opendir( DH, $dir ) or die 'Cannot open ' . $dir; grep { -f $_ } readdir(DH); };

--
John.