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

Re: pack and ASCII

Thread Previous | Thread Next
Father Chrysostomos
January 15, 2012 14:08
Re: pack and ASCII
Message ID:

On Jan 15, 2012, at 2:06 PM, Eric Brine wrote:

> On Sun, Jan 15, 2012 at 4:51 PM, Father Chrysostomos <> wrote:
> Eric Brine wrote:
> > On Sat, Jan 14, 2012 at 11:11 AM, Jesse Luehrs <> wrote:
> > > Passing non-ASCII characters to pack (or at least, to a format
> > > like 'A') should be caught as an error *when you do that*, not just
> > > something that does the wrong thing silently.
> >
> > I agree with everything you said here.
> But I thought you did *not* want it to be an error.
> The message was sent prematurely as a second was sent. In short, I can't think of a use for C<< pack "N/A*" >>, so I think it (specifically) could give an error (warn).

It’s hard to argue about that particular case, but I think it needless complicates things.  Where do we stop?  After all, pack "A*NA*" is never right, even for octet-sized input.

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