From DB
AB1/1
AB1/5
AB2/5
From Input
AB1/1
AB1/2
AB1/5
AB1/6
AB1/9
AB2/2
AB2/5
AB2/6
AB2/9
AB2/13
####
AB1/1 : Found AB1/1
AB1/2 : NotFound AB1/2
AB1/5 : Found AB1/5
AB1/6 : NotFound AB1/6
AB1/9 : NotFound AB1/9
AB2/2 : NotFound AB2/2
AB2/5 : Found Ab2/5
AB2/6 : NotFound Ab2/6
AB2/9 : NotFound AB2/9
AB2/13 : NotFound AB2/13
####
#! c:/perl/bin/perl.exe
#
use strict;
use warnings 'all';
my @NotFound;
my @DB = qw(AB1/1 AB1/5 AB2/5);
print "\nFrom DB\n";
for my $DBData (@DB)
{
print "$DBData\n";
}
print "\nFrom Input\n";
my @Input = qw(AB1/1 AB1/2 AB1/5 AB1/6 AB1/9 AB2/2 AB2/5 AB2/6 AB2/9 AB2/13);
for my $InputData (@Input)
{
print "$InputData\n";
}
##################################################
print "\nSearching\n";
for my $DBData (@DB)
{
for my $InputData (@Input)
{
if ("$DBData" eq "$InputData")
{
print "$InputData : Found $DBData\n";
last;
}
else
{
print "$InputData : NotFound $DBData\n";
}
}
}
print "\nSize of NotFound Array $#NotFound\n";
####
From DB
AB1/1
AB1/5
AB2/5
From Input
AB1/1
AB1/2
AB1/5
AB1/6
AB1/9
AB2/2
AB2/5
AB2/6
AB2/9
AB2/13
Searching
AB1/1 : Found AB1/1
AB1/1 : NotFound AB1/5
AB1/2 : NotFound AB1/5
AB1/5 : Found AB1/5
AB1/1 : NotFound AB2/5
AB1/2 : NotFound AB2/5
AB1/5 : NotFound AB2/5
AB1/6 : NotFound AB2/5
AB1/9 : NotFound AB2/5
AB2/2 : NotFound AB2/5
AB2/5 : Found AB2/5
Size of NotFound Array -1