--- Paul <[EMAIL PROTECTED]> wrote:
Sorry for the null-mail, ladies and gents.
I apparently hit the wrong button and sent a quoted response to the
list without adding anything to it. I apologize for wasting your time,
mailbox space, and bandwidth. =o)
Now, since I did so:
> --- COLLINEAU Franck FTRD/DMI/TAM
> <[EMAIL PROTECTED]> wrote:
> > Hi!
Hi. :o)
> > How can i do to insert several lines in the
> > beginning of a existant file ?
> > Thanks
> > Franck
assuming files orig.txt and top.add, try
open NEW, ">tmpout$$" or die "$! tmpout$$";
open IN, "top.add" or die "$! top.add";
print NEW while <IN>;
open IN, "orig.txt" or die "$! orig.txt";
print NEW while <IN>;
rename "tmpout$$", "orig.txt" or die "$! rename";
To add datat to the *top* of a file, you have to rewrite the whole
file. That's just the nature of filesystems. You always add data at the
bottom, or overwrite what's there.
Does that help?
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]