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
Felipe Gasper
June 29, 2013 14:27
Re: [perl #118651] readdir() should not set $! on the first "eof" read.
Message ID:
readdir() is setting $! in the one-liner that I gave .. that's what I mean by "error".

James E Keenan via RT <> wrote:

>On Thu Jun 27 15:17:07 2013, 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About