Search notes:

Perl module List::Compare

use warnings;
use strict;

use List::Compare;

my @l1 = qw(foo bar bar baz one     three      four);
my @l2 = qw(    bar     baz one two three four four);

my $c = List::Compare->new('--unsorted', \@l1, \@l2);

print "get_intersection\n  ";
print join "\n  ", $c->get_intersection;
#  bar
#  three
#  baz
#  one
#  four

print "\nget_union\n  ";
print join "\n  ", $c->get_union;
#  two
#  four
#  one
#  bar
#  foo
#  baz
#  three

print "\nget_unique\n  ";  # Elements only in first list
print join "\n  ", $c->get_unique;
#  foo

print "\nget_complement\n  ";  # Elements only in second list
print join "\n  ", $c->get_complement;
#  two
Github repository PerlModules, path: /List/Compare/script.pl
Perl modules.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1741107287, '3.145.34.133', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/modules/List/Compare/index(70): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78