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

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

Thread Previous | Thread Next
From:
Felipe Gasper
Date:
June 29, 2013 14:27
Subject:
Re: [perl #118651] readdir() should not set $! on the first "eof" read.
Message ID:
9a9911e7-c37d-405d-96e0-866cd7882676@email.android.com
readdir() is setting $! in the one-liner that I gave .. that's what I mean by "error".

James E Keenan via RT <perlbug-followup@perl.org> wrote:

>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

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Thread Previous | Thread Next


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