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>
Download (untitled) / with headers
text/plain 181b
Hi. Simple code ------------------------------ open(F,"test.bin"); binmode F; sysread(F,$byte,1); print tell F; close F; ------------------------------ always returns 0. Regards
Download (untitled) / with headers
text/plain 754b
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.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.