in reply to Using Array::Diff
use warnings; use strict; use Array::Diff; my @old = ( 'a', 'b', 'c' ); my @new = ( 'b', 'c', 'd' ); my $diff = Array::Diff->diff( \@old, \@new ); my $cnt = $diff->count; my $add = $diff->added; my $del = $diff->deleted; print "$cnt\n@{$add}\n@{$del}\n"; __END__ 2 d a
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using Array::Diff
by edimusrex (Monk) on Dec 02, 2014 at 22:08 UTC |