projects
/
p5sagit/p5-mst-13.2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
1694bc1
)
Modernize opendir() syntax
Rafael Garcia-Suarez [Tue, 10 Jul 2007 06:17:50 +0000 (06:17 +0000)]
p4raw-id: //depot/perl@31576
pod/perlsub.pod
patch
|
blob
|
blame
|
history
diff --git
a/pod/perlsub.pod
b/pod/perlsub.pod
index
a04dfc9
..
fed1474
100644
(file)
--- a/
pod/perlsub.pod
+++ b/
pod/perlsub.pod
@@
-1302,10
+1302,9
@@
that understands regular expressions.
sub glob {
my $pat = shift;
my @got;
- local *D;
- if (opendir D, '.') {
- @got = grep /$pat/, readdir D;
- closedir D;
+ if (opendir my $d, '.') {
+ @got = grep /$pat/, readdir $d;
+ closedir $d;
}
return @got;
}