Skip Menu |

This queue is for tickets about the Perl-Dist-Strawberry CPAN distribution.

Report information
The Basics
Id: 113282
Status: open
Priority: 0/
Queue: Perl-Dist-Strawberry

People
Owner: Nobody in particular
Requestors: plaksin [...] vsmpo.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: tell function bug in any version of strawberry perl
Date: Wed, 23 Mar 2016 08:28:52 +0500
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: Andrey Plaksin <plaksin [...] vsmpo.ru>
Hi. Simple code ------------------------------ open(F,"test.bin"); binmode F; sysread(F,$byte,1); print tell F; close F; ------------------------------ always returns 0. Regards
On 2016-03-22 23:29:04, plaksin@vsmpo.ru wrote: Show quoted text
> Hi. > Simple code > > ------------------------------ > open(F,"test.bin"); binmode F; > sysread(F,$byte,1); > print tell F; > close F; > ------------------------------ > > always returns 0.
This is not an issue with strawberry, but with every perl. And the behavior is kinda documented. "perldoc -f sysread" says: It bypasses buffered IO, so mixing this with other kinds of reads, "print", "write", "seek", "tell", or "eof" can cause confusion because the perlio or stdio layers usually buffers data. "perldoc -f sysseek" suggests how to implement a systell function. I suggest to close this ticket.