Update Module::Load::Conditional to 0.20
[p5sagit/p5-mst-13.2.git] / pod / perlsub.pod
index a04dfc9..fed1474 100644 (file)
@@ -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;
     }