develooper Front page | perl.perl5.porters | Postings from February 2000

Re: should "use byte" be "use bytes"?

From:
Andy Dougherty
Date:
February 10, 2000 13:20
Subject:
Re: should "use byte" be "use bytes"?
Message ID:
Pine.SOL.4.10.10002101604420.1273-100000@maxwell.phys.lafayette.edu
On Thu, 10 Feb 2000, Larry Wall wrote:

> Andy Dougherty writes:
> : Do you mean to say that it's impossible (not unlikely, but impossible) for
> : me to currently have a literal UTF-8 string constant in a program
> : (possibly automatically generated by another program) designed to deal
> : with arbitrary 8-bit binary data?  

> Certainly in current maintenence versions of Perl, you can embed binary
> string constants in your script that might or might not resemble utf8.
> Old Perl doesn't care.

Exactly.  And that's occasionally been handy and convenient. My original
point was simply that one needn't necessarily understand utf8 in order to
know that what you really want is 'use bytes'.

> With 5.6, I think the best parsing approach is this:

[nice detailed summary omitted]

Yes, I think that the 5.6 plan sounds like a good one.  It seems to me to
be a good example of perl's ability to DWIM.  And, all things considered,
the 'use bytes' pragma is a sensible and reasonable escape hatch that will
occasionally be handy and convenient.

    Andy Dougherty		doughera@lafayette.edu
    Dept. of Physics
    Lafayette College, Easton PA 18042





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About