Re: Adding a line in a file inside many directories

2007-06-29 Thread John W. Krahn
[EMAIL PROTECTED] wrote: On Jun 28, 12:00 pm, [EMAIL PROTECTED] (Ved) wrote: Now I have to print a single line at say line number 20 in each of 150 number of kat.s file. Hey, another chance to show off my favorite Perl module, IO::All. Situation is bit complex (atleast for a beginer like me

Re: Adding a line in a file inside many directories

2007-06-29 Thread usenet
On Jun 28, 12:00 pm, [EMAIL PROTECTED] (Ved) wrote: > Now I have to print a single line at say line number 20 in each of 150 > number of kat.s file. Hey, another chance to show off my favorite Perl module, IO::All. > Situation is bit complex (atleast for a beginer like me). Actually it is so si

Re: Adding a line in a file inside many directories

2007-06-29 Thread Tom Phoenix
On 6/28/07, Ved <[EMAIL PROTECTED]> wrote: open (VEDIN, 'list_of_dir.txt') or die "Cannot open 'File.txt' $!"; Why does the error message mention the wrong file name? my @rgstr=; foreach my $file_list (@rgstr) { print $file_list ;#printing list of dir The items in this list haven't

Adding a line in a file inside many directories

2007-06-29 Thread Ved
Hi all, I am a beginer in PERL. What I am trying to do is this: I have a 150 directories, each having a file "kat.s" in them. I have names of all these directories in a text file "list_of_dir.txt". I have to open the each of "kat.s" in all the 150 directories and add a line(say "ABCD" at line numb

Adding a line in a file inside many directories

2007-06-29 Thread Ved
Hi All, Situation is bit complex (atleast for a beginer like me). Directory structure is somewhat like this: testcases--> 150 Directories (names starting with mixed or green.) --- > kat.s i.e. a directrory named testcases has 150 number of directories in it and each of those 150 number of director