![]() |
|
Perl: the Markov chain saw | |
PerlMonks |
localizing handles with anonymous subroutinesby particle (Vicar) |
on Jun 10, 2002 at 13:09 UTC ( #173106=snippet: print w/replies, xml ) | Need Help?? |
my $dir = '/path/to/files'; my @files = sub{ local *DH; opendir( DH, $_[0] ) or die 'Cannot open ' . $_[0]; return grep { -f $_ } readdir(DH); }->( $dir );
|
|