sorry! what i'm trying to mean that is i want to open all the files in a directory which the name ended by .doc. let's say the file called "file1.doc", "file2.doc", "file3.doc", .... and the directory called "document". i had try out this script but it could not function. there is nothing in the "result"

Actually after the previous discussion, i need to do an assignment. My assignment are as follow:- I have 2 directories, "DIR_A" & "DIR_B". In the "DIR_A" i have many file which the name end by ".doc1" (e.g: file1.doc1, file2.doc1, ...). all the content in the files as follow(example):

file1.doc1::Start ali Baba zarul Bahrul alec Foong caster Lee ::End

file2.doc1::Start Calvin Lee Ester Foong Alex WongLee Kim ::End

file3.doc1::Start jocob Lim irene Chai ::End

where else in "DIR_B" i have many files as well which the name end by "_fast.txt" and "_slow.txt" all the content in the files as follow(example):

file1_fast.txtthis is the 1st linethis is the 2nd linename(ali) this is the 3rd line name(zarul) this is the 4th line name(alec) this is the 5th line this is the 6th line

file2_fast.txtthis is the 1st line this is the 2nd line name(calvin) this is the 3rd line name(alex) this is the 4rd line file3_fast.txtthis is the 1st linethis is the 2nd linename(jacob) this is the 3rd line this is the 4th line name(irene) this is the 5th line this is the 6th line

file1_slow.txtthis is 1st sentencename(ali) this is 2st sentence name(zarul) this is 3st sentence name(alec) this is 4st sentence

file2_slow.txtthis is 1st sentence this is 2st sentence name(calvin) this is 3st sentence name(alex) this is 4st sentence

file3_slow.txtthis is 1st sentence name(jacob) this is 2st sentence name(irene) this is 3st sentence

where there are the same name between "_fast.txt" and "_slow.txt" as u can see above "file1_fast.txt" = "file1_slow.txt" "file2_fast.txt" = "file2_slow.txt" "file3_fast.txt" = "file3_slow.txt" the content between the "_fast.txt" and "_slow.txt" are not the same but the info that need to extract is same.

All the info are in blue color. This is my home directory (/eng/home/assignment) where the "DIR_A" and " DIR_B" are located.I need to compare the info in all the files between "DIR_A" and "DIR_B". The comparison need to make by the same file name (e.g: file1.doc with file1_fast.txt with file1_slow.txt)

the output of the comparison will look like this: file1caster

file2 ester lee

file3 none

It only show the different of the comparison

so what is the concept, methodology or how the flow chart will looks like?

DIR_A 1) Go in to DIR_A 2) Sort files to make all the files between ".doc", "_fast.txt" and "_slow.txt" the same. (e.g: file1.doc = file1_fast.txt = file1_slow.txt) 3) Open the files one by one 4) Extract info 5) Sort the info 6) compare 7) Print out the result (different & same)

DIR_B1) Go in to DIR_B 2) choose the same type of file (e.g: _fast.txt and _slow.txt) 3) Sort files to make all the files between ".doc", "_fast.txt" and "_slow.txt" the same. (e.g: file1.doc = file1_fast.txt = file1_slow.txt) 3) Open the files one by one 4) Extract info 5) Sort the info 6) compare 7) Print out the result (different & same)

Actually i learn this PERL by my self. Non of my friends know PERL. I feel that PERL is very usefull espeacially for extraction process. So, i hope this forum will help me. And i hope u will guide me thru my learning process.

OK, well, I'm really not a very good teacher. I am a self taught perl coder myself and my education has some large gaps in it but I'll try and assist you. -------------------------------------------------