RE: Append on top

From: NYIMI Jose \ (Jose.NYIMI_at_proximus.net)
Date: 10/29/04


Date: Fri, 29 Oct 2004 12:23:54 +0200
To: "Ing. Branislav Gerzo" <konfera@2ge.us>, <beginners@perl.org>


> -----Original Message-----
> From: Ing. Branislav Gerzo [mailto:konfera@2ge.us]
> Sent: Friday, October 29, 2004 11:36 AM
> To: beginners@perl.org
> Subject: Re: Append on top
>
>
> 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
> RD> on top of 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 >>

Or no need to open the file:

use Tie::File;
tie @array, 'Tie::File', filename or die "...";
unshift @array, "new recs"; #will append on top
untie @array;

HTH,
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.



Relevant Pages

  • [ANN] Rio 0.4.1
    ... = Rio - Ruby I/O Facilitator ... Iterate over the .rb files in a directory and its subdirectories. ... Return an array of the .rb files in a directory and its ... Copy or append a file to a string ...
    (comp.lang.ruby)
  • {ANN] Rio 0.4.0
    ... = Rio - Ruby I/O Facilitator ... Iterate over the .rb files in a directory and its subdirectories. ... Return an array of the .rb files in a directory and its ... Copy or append a file to a string ...
    (comp.lang.ruby)
  • Re: Appending text files
    ... > Does anyone know how to append text files using VB? ... text files from SQL Server using DTS. ... The array can contain one or more filenames. ... Dim FileIn As Long ...
    (microsoft.public.vb.general.discussion)
  • RE: 2nd table need to add more fields other than from the 1st tabl
    ... You will not need to use an array. ... Another would be to construct either an append or an update ... > to manipulate them. ... >>> fields item names, prices and the second table includes item names, prices, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Append from array - Memofeld
    ... > a) mit APPEND FROM FileName ... > b) Umweg über ein ARRAY ... > den View eine Tabelle zwischenspeichern? ...
    (microsoft.public.de.fox)