diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-07-10 06:17:50 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-07-10 06:17:50 +0000 |
commit | 7b815c6704d8d91c01d55658479cef13e65d2733 (patch) | |
tree | a34232d4aedcd8a9114b0d45db743c9811c37827 /pod/perlsub.pod | |
parent | 1694bc1323f3c2ea90d7478c304c5f10b28e69f3 (diff) | |
download | perl-7b815c6704d8d91c01d55658479cef13e65d2733.tar.gz |
Modernize opendir() syntax
p4raw-id: //depot/perl@31576
Diffstat (limited to 'pod/perlsub.pod')
-rw-r--r-- | pod/perlsub.pod | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pod/perlsub.pod b/pod/perlsub.pod index a04dfc95c4..fed1474a03 100644 --- 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; } |