develooper Front page | perl.perl5.porters | Postings from January 2012

Re: pack and ASCII

Thread Previous | Thread Next
Leon Timmermans
January 10, 2012 14:55
Re: pack and ASCII
Message ID:
On Tue, Jan 10, 2012 at 9:17 PM, Eric Brine <> wrote:
> bytes::length does not return the number of bytes in $foo.

It seems I define byte as octet of data, and you define it as
character in a bytestring, which causes confusion (yeah I know, both
of these definitions suck, but I hope you know what I mean).

> Not true. Those aren't exclusive. Right now, both DWIM. The former returns
> exactly one byte. The latter returns exactly one character.

They don't DWIM for me. I mean to get a bytestring as result. I mean
the quantifier to A/a to be the with in octets, always.

> You still didn't say what you think the two formats should do.

I want reliable byte semantics when I'm using pack. If other people
want character semantics that should be separate from this. This
polymorphism is madness.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About