Front page | perl.perl5.porters |
Postings from November 2000
Re: PerlIO - what next ?
Thread Previous
|
Thread Next
From:
Nick Ing-Simmons
Date:
November 8, 2000 07:14
Subject:
Re: PerlIO - what next ?
Message ID:
200011081513.PAA08137@mikado.tiuk.ti.com
Simon Cozens <simon@cozens.net> writes:
>On Wed, Nov 08, 2000 at 01:50:06PM +0000, Nick Ing-Simmons wrote:
>> Do you want getc($fh) return character or a byte depending on the handle's
>> top "layer" ?
>
>I vote yes.
>
>> Likewise does $count = read($fh,$buffer,10); read 10 chars or 10 bytes
>> depending on mode ?
>
>Again, I think so.
>
>> How do you want I open a file which is utf8 or shift-jis or whatever?
>> What should "binmode" mean now we have layers?
>
>perldoc open?
Oh the handy pragma - what do you know ...
What level of discussion has this had ? - Can I suggest it needs
a little more ...
_My_ first question is what are all the ':' for ? and seconds
is do we really want strings?
use open IN => ":crlf", OUT => ":raw";
What about INOUT handles ?
Why IN rather than '<' as the "key" ?
What is syntax for more-than one:
A. use open IN => ':uft8', ':crlf';
B. use open IN => ':uft8 :crlf';
C. use open IN => ':uft8 :crlf';
D. use open IN => [':uft8',':crlf'];
=item binmode FILEHANDLE, DISCIPLINE
That allows me to "add" one - how do I take one off ?
Why
open FH, "<:para :DEFAULT", $file or die "can't open $file: $!";
open FH, "<:utf8 :crlf", $file or die "can't open $file: $!";
and not
open FH, '<', $file, 'para', @open::DEFAULT or die
open FH, '<', $file, 'utf8', 'crlf' or die
Its a list operator - give it a list ...
--
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.
Thread Previous
|
Thread Next