develooper Front page | perl.perl5.porters | Postings from June 2013

[perl #118651] readdir() should not set $! on the first "eof" read.

Thread Previous
From:
James E Keenan via RT
Date:
June 29, 2013 13:50
Subject:
[perl #118651] readdir() should not set $! on the first "eof" read.
Message ID:
rt-3.6.HEAD-2552-1372513791-1567.118651-15-0@perl.org
On Thu Jun 27 15:17:07 2013, felipe@felipegasper.com wrote:
> [snip]

> there is always an error at the normal end of iterating through the
>    directory.
> 

Could you explain what makes you believe that?

In 'perldoc -f readdir', I see this:

#####
If there are no more entries, [readdir] returns the undefined value in
scalar context and the empty list in list context.
#####

Neither the undefined value nor an empty list is an error.

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=118651

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About