On Wed, Oct 09, 2002 at 02:28:58AM -0700, Hello Buddy wrote: > What I am facing now is when I write to format text file, suppose I was > currently in line 10 for my formatted text file and I want to append some > word in line 5 of formatted text file.
Please see perldoc -q "line in a file", or http://www.perldoc.com/perl5.6.1/pod/perlfaq5.html (second question) for discussion on inserting a line in a file. The short answer is you can't; you'll have to essentially copy the file, inserting the line you need as you go. If the file you're editing has fixed lines it is possible to overwrite a line, but to insert one you'd have to overwrite a line, then write each following line in to the end of the file. Given that, it would appear that the file is not the appropriate solution to your problem. You may want to look into a DBM (perldoc DB_File), or a DBMS (mysql, PostgreSQL, etc.). Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com -- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]