Front page | perl.perl6.internals |
Postings from January 2002
Re: on parrot strings
Thread Previous
|
Thread Next
From:
Dave Mitchell
Date:
January 21, 2002 08:39
Subject:
Re: on parrot strings
Message ID:
200201211637.QAA08150@gizmo.fdgroup.co.uk
Jarkko Hietaniemi <jhi@iki.fi> wrote:
> There is no string type built out of native eight-bit bytes.
In the good ol'days, one could usefully use regexes on 8-bit binary data,
eg
open G, 'myfile.gif' or die;
read G, $buf, 8192 or die;
if ($buf =~ /^GIF89a\x08\x02/) {
.....
where it was clear to everyone that we are checking whether the first few
bytes of the file contain (0x47, 0x49, ..., 0x02)
Is this sort of thing now completely dead in the Brave New World of
Unicode, Locales etc etc? (yes, there's always pack, but pack is so... errr....
hmmmmmm ....)
Dave.
Thread Previous
|
Thread Next