Oops.... seems I 've made some confusion on my question...
What I am trying to do is like that...
LN0;T=1;C=2;B=1234567890
LN1;T=0;C=3;B=AABBBCCC
LN2;T=0;C=4;B=0987654321
(something like that in same structure)
What I wish to is able to write to any 'block' / 'segment' on demand...
All what I hope is to find a way to write by a certain location without
to rewriting the whole file again.
Since >> is append on last, > is rewrite... so... would there anyway can
just 'write some pieces' ?
Thank's for any recommandation,
Connie
----- Original Message -----
From: "drieux" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 11:18 PM
Subject: Re: Random write ?
>
> On Wednesday, May 15, 2002, at 07:21 , Connie Chan wrote:
>
> > Hi everybody,
> >
> > Is there any method to write a file ( text / bin ) by random ?
> > just like what "seek" does.
>
> where you want to start is with
>
> perldoc -f seek
>
> since you will notice
>
> a) that it exists
> b) tell exists - cf perldoc -f tell
>
> where you will notice that there is a sysseek...
>
> what I will mention is to TAKE SERIOUSLY the caution in
>
> perldoc -f sysread
>
> since you REALLLY REALLY WAY OH THE PAIN REALLY do
> not want to mix sysread and the standard 'read' on
> the same file descriptor...
>
> Hence may I recommend that if you are going to use the
> 'seek' side that you make yourself quite at home with
> doing the sysread side of the game first....
> { which if you are coming from the 'c' side of the game
> seems more 'natural' since managing $buf and $length
> makes one more at home... }
>
>
> ciao
> drieux
>
> ---
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]