Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
thanks for any suggestions....open (FILE1, $file1); open (FILE2, $file2); for (FILE1) { chomp; @filearray1 = split; for (FILE2) { chomp; @filearray2 = split; if ($filearray1[0] eq $filearray2[0]) { print $filearray1[0]; print $filearray2[0]; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: comparing files
by metadatum (Scribe) on Aug 22, 2002 at 20:21 UTC | |
|
Re: comparing files
by sauoq (Abbot) on Aug 22, 2002 at 21:07 UTC | |
by Anonymous Monk on Aug 23, 2002 at 15:28 UTC | |
by mephit (Scribe) on Aug 23, 2002 at 21:09 UTC | |
|
Re: comparing files
by insensate (Hermit) on Aug 22, 2002 at 20:34 UTC |