|
NAMEArray::Diff - Find the differences between two arraysSYNOPSISmy @old = ( 'a', 'b', 'c' ); my @new = ( 'b', 'c', 'd' ); my $diff = Array::Diff->diff( \@old, \@new ); $diff->count # 2 $diff->added # [ 'd' ]; $diff->deleted # [ 'a' ]; DESCRIPTIONThis module compares two pre-sorted arrays and returns the added or deleted elements in two separate arrays. It's a simple wrapper around Algorithm::Diff.Note: the arrays must be sorted before you call "diff". And if you need more complex array tools, check Array::Compare. METHODS
SEE ALSOArray::Compare - performs the same function as this module, but has options for controlling how it works.List::Compare - similar functionality, but again with more options. Algorithm::Diff - the underlying implementation of the diff algorithm. If you've got Algorithm::Diff::XS installed, that will be used. YAML::Diff - find difference between two YAML documents. HTML::Differences - find difference between two HTML documents. This uses a more sane approach than HTML::Diff. XML::Diff - find difference between two XML documents. Hash::Diff - find the differences between two Perl hashes. Data::Diff - find difference between two arbitrary data structures. Text::Diff - can find difference between two inputs, which can be data structures or file names. AUTHORDaisuke Murase <typester@cpan.org>COPYRIGHT AND LICENSECopyright (c) 2009 by Daisuke Murase.This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module.
Visit the GSP FreeBSD Man Page Interface. |