From: Rafael Garcia-Suarez Date: Tue, 10 Jul 2007 06:17:50 +0000 (+0000) Subject: Modernize opendir() syntax X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7b815c6704d8d91c01d55658479cef13e65d2733;p=p5sagit%2Fp5-mst-13.2.git Modernize opendir() syntax p4raw-id: //depot/perl@31576 --- diff --git a/pod/perlsub.pod b/pod/perlsub.pod index a04dfc9..fed1474 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; }