RE: how to append test to file

2004-11-09 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > Hi Frnds, > I myself found some way.Read the file to an array and created a file > as > per requirement and then inserted the objects in the array to file. > > for ($i=0;$i < $#arr;$i++) > { > print OUTPUT $arr[$i]; > } > ==

RE: how to append test to file

2004-11-09 Thread arjun.mallik
jun -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 2:31 PM To: [EMAIL PROTECTED] Subject: RE: how to append test to file Hi , Can any suggest some thing for my problem, like I need to append to a file from last but one line of the existing file.

RE: how to append test to file

2004-11-09 Thread arjun.mallik
PROTECTED] Sent: Monday, November 08, 2004 8:24 PM To: [EMAIL PROTECTED] Subject: how to append test to file Hi , there is an existing file and I need to append text to it ,only thing is I need to remove the last line of existing file and then need to append text. I hope I am clear.If there are

Re: how to append test to file

2004-11-08 Thread Prasanna Kothari
Hi, Store all the contents of the file in an array and operate on the array. There should be a better way(inline modification i guess using "-i" option). #!/usr/bin/perl -w use strict; my @arr; my $filename = "testtest"; open(FH,"<","$filename") || die "Could not open $filename\n"; @arr=; $arr[$#ar

RE: how to append test to file

2004-11-08 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > Hi , > > > there is an existing file and I need to append text to it ,only thing > is I need to remove the last line of existing file and then need to > append text. > I hope I am clear.If there are 6 lines in a file I have remove 6th > line > and then need to append

how to append test to file

2004-11-08 Thread arjun.mallik
Hi , there is an existing file and I need to append text to it ,only thing is I need to remove the last line of existing file and then need to append text. I hope I am clear.If there are 6 lines in a file I have remove 6th line and then need to append the text. Thanks in advance Arjun C