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.
In Section
Cool Uses for Perl