Help for a Beginner 
Author Message
 Help for a Beginner

I have two files, A and B.  A has a list of alpha-numeric codes on each
line.  B has three alpha-numeric codes on each line.  I need to compare A
with the first set of data on each line of B.  If it finds a match write
that match to file 3Match.2   If the data does not match, write the data
from B into a file 3Not_found2 and the data from A into 3Purge.2

I can open each files, splice the lines and get the data needed:
   while (<INDATA>) {
      ($cat_no, $edp, $dpt) = split(/\s/, $_);
      #print "1st Cat number : $cat_no\n";

   while (<INARC>) {


Then when I go to write the files nothing is there.
   if ($image eq $cat_no) {
      #print zimage $cat_no, "\n";
   print "2nd Cat number : $cat_no\n";
   print "2nd Image file : $image\n";
   else {
   print "3rd Cat number : $cat_no\n";
   print "3rd Image file : $image\n";
      #print nothere $cat_no, "\n";
      #print pfile $image, "\n";

I know this is easy, I just can1t figure it out.

Wed, 16 Jul 1997 01:05:56 GMT  
 [ 1 post ] 

 Relevant Pages 

1. patten help for a beginner?

2. Help for a beginner pls.

3. Help for a beginner

4. Help for a beginner!!! (convert binary number to hex)

5. Help: a beginner cannot make for/foreach loop running

6. Beginner needs help

7. Help a beginner

8. Beginner's help with OLE module

9. help for a perl beginner!

10. HELP: Absolute beginner page creation question.

11. Beginner wants help with combining lines (not columns) across files

12. I am a beginner -- need some HELP!


Powered by phpBB® Forum Software