#!/usr/bin/env perl
use List::MoreUtils;
@A = qw( 2019/07/05 2019/07/10 2019/07/15 2019/07/20);
%A = map {$_, 1} @A;
@B = qw( 2019/07/08 2019/07/10 2019/07/20);
%B = map {$_, 1} @B;
@C = qw( 2019/07/15 2019/07/20 2019/07/25);
%C = map {$_, 1} @C;
SEARCH:
for ( List::MoreUtils::uniq (@A, @B, @C) ){
if ($A{$_} && $B{$_} && $C{$_}){
print "everyone is free at $_\n";
next SEARCH;
}
if ($A{$_} && $B{$_} ){
print "A and B is free at $_\n";
}
if ($B{$_} && $C{$_}){
print "B and C is free at $_\n";
}
if ($A{$_} && $C{$_}){
print "A and C is free at $_\n";
}
}
use List::MoreUtils;
@A = qw( 2019/07/05 2019/07/10 2019/07/15 2019/07/20);
%A = map {$_, 1} @A;
@B = qw( 2019/07/08 2019/07/10 2019/07/20);
%B = map {$_, 1} @B;
@C = qw( 2019/07/15 2019/07/20 2019/07/25);
%C = map {$_, 1} @C;
SEARCH:
for ( List::MoreUtils::uniq (@A, @B, @C) ){
if ($A{$_} && $B{$_} && $C{$_}){
print "everyone is free at $_\n";
next SEARCH;
}
if ($A{$_} && $B{$_} ){
print "A and B is free at $_\n";
}
if ($B{$_} && $C{$_}){
print "B and C is free at $_\n";
}
if ($A{$_} && $C{$_}){
print "A and C is free at $_\n";
}
}