Oh yes ! 
The magic Tie ...

Enjoy!

José.

-----Original Message-----
From: Janek Schleicher [mailto:[EMAIL PROTECTED]] 
Sent: Friday, August 09, 2002 5:45 PM
To: [EMAIL PROTECTED]
Subject: Re: printing to the top of a file


Stephen Redding wrote at Fri, 09 Aug 2002 10:54:01 +0200:

> I have a text file that i want to insert two lines to the top of. how 
> do i do this?

A solution where it's not necessary to think is to use the Tie::File module.

use Tie::File;
tie my @line, 'Tie::File', 'filename.txt' or die "...";
unshift @line, $line1, $line2;


Greetings,
Janek


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



**** 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. 
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]

Reply via email to