Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I get the following error:
Can't locate object method "new" via package "Algorithm::Diff" at diff.pl line 25.
I am using Perl 5.8.4 on XP. My code is
require Algorithm::Diff; my $file_old = "file1.log"; my $file_new = "file2.log"; open ( F1, $file_old ) or die "Can't open $file_old : $!\n"; open ( F2, $file_new ) or die "Can't open $file_new : $!\n"; my @seq1 = <F1>; my @seq2 = <F2>; close ( F1 ); close ( F2 ); my $diff = Algorithm::Diff->new( \@seq1, \@seq2 ); $diff->Base( 1 ); # Return line numbers, not indices
I also tried changing it to 'use Algorithm::Diff'. What can be the cause of the error? Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't locate object
by Errto (Vicar) on Dec 08, 2004 at 01:50 UTC | |
by Anonymous Monk on Dec 08, 2004 at 04:42 UTC | |
by Errto (Vicar) on Dec 08, 2004 at 05:14 UTC | |
by Anonymous Monk on Dec 08, 2004 at 05:19 UTC | |
by tye (Sage) on Dec 09, 2004 at 06:43 UTC | |
|
Re: Can't locate object
by Corion (Patriarch) on Dec 08, 2004 at 07:14 UTC |