> -----Original Message----- > From: Gary Stainburn [mailto:[EMAIL PROTECTED] > Sent: Monday, November 15, 2004 2:25 PM > To: [EMAIL PROTECTED] > Subject: Re: Append on top > > > On Friday 29 October 2004 10:35 am, Ing. Branislav Gerzo wrote: > > Rajesh Dorairajan [RD], on Thursday, October 28, 2004 at 18:11 > > (-0700) thoughtfully wrote the following: > > > > RD> Does anyone know of a way to open a file in append mode and > > append on top of RD> the file? > > > > I don't think it is possible. You have to read source file, > and after > > print your results to new file (open through >) and append old file > > through >> > > It is possible, but very messy. The above method is the most > efficient, > but does require free disk space equivelent to the the size > of the new > file. Not usually a problem these days, withthe low cost of HDDs. > > However, if you do have these restrictions it can be done using the > psudocode below > > calculate write_size > seek EOF-buffer_size > read buffer_size > seek EOF-buffer_size+write_size > repeat until at BOF >
Why should I care with all these details when Tie::File is available from CPAN. And now comes as standard dist of recent Perl version ? José. **** DISCLAIMER **** "This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. This email is not intended to create or affect any contractual arrangements between the parties. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer". Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>