[EMAIL PROTECTED] wrote:
I want to compare the two files in Perl. The requirement is that file 1
has 20 lines and file2 has 25 lines . I want to see only five lines as
output which are there in file2 not in file1 as I know that rest of the
20 lines are same in both the files.

I am using the following commands
Diff /tmp/dev_path_PRS.DB.01.12.000 /tmp/dep_path_D.PRS.DB.01.12.000.8

C:\home>type test.pl
use strict;
Diff /tmp/dev_path_PRS.DB.01.12.000
     /tmp/dep_path_D.PRS.DB.01.12.000.8

C:\home>perl test.pl
Bareword "Diff" not allowed while "strict subs" in use at test.pl line 2.
Bareword "tmp" not allowed while "strict subs" in use at test.pl line 2.
Bareword "dev_path_PRS" not allowed while "strict subs" in use at test.pl line 2.
Bareword "DB" not allowed while "strict subs" in use at test.pl line 2.
Bareword "tmp" not allowed while "strict subs" in use at test.pl line 2.
Bareword "dep_path_D" not allowed while "strict subs" in use at test.pl line 2.
Bareword "PRS" not allowed while "strict subs" in use at test.pl line 2.
Bareword "DB" not allowed while "strict subs" in use at test.pl line 2.
Execution of test.pl aborted due to compilation errors.

C:\home>

The FAQ entry "perldoc -q difference.+arrays" may be useful.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to