Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.95k stars 554 forks source link

[doc] https://perldoc.perl.org/functions/readdir #22632

Closed dervikxx closed 5 days ago

dervikxx commented 3 weeks ago

Where https://perldoc.perl.org/functions/readdir

Description incorrect first example, array will be all time empty - grep { /^\./ && -f "$some_dir/$_" }

haarg commented 3 weeks ago

The example is trying to find files starting with a .. The code accomplishes that. Why do you think that the array would be empty?

tonycoz commented 5 days ago

The example works and no response from the OP, closing.