Array::Diff - Diff two arrays
my @old = ( 'a', 'b', 'c' ); my @new = ( 'b', 'c', 'd' ); my $diff = Array::Diff->diff( \@old, \@new ); $diff->added # [ 'd' ]; $diff->deleted # [ 'a' ];
This module do diff two arrays, and return added and deleted arrays. It's simple usage of Algorithm::Diff.
Algorithm::Diff
Daisuke Murase <typester@cpan.org>
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.
To install Array::Diff, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Array::Diff
CPAN shell
perl -MCPAN -e shell install Array::Diff
For more information on module installation, please visit the detailed CPAN module installation guide.