Hello, On Wed, 2018-02-14 at 20:35 +0100, Bernhard Held wrote: > Correctly check length of list. > Credit to Bernhard Bitsch for pointing in the right direction. > --- > config/cfgroot/network-functions.pl | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/config/cfgroot/network-functions.pl b/config/cfgroot/network-functions.pl > index 2902aabb0..070e14d0f 100644 > --- a/config/cfgroot/network-functions.pl > +++ b/config/cfgroot/network-functions.pl > @@ -111,8 +111,9 @@ sub network_equal { > my @bin1 = &network2bin($network1); > my @bin2 = &network2bin($network2); > > - if (!defined $bin1 || !defined $bin2) { > - return undef; > + unless (scalar @bin1 == 2 && > + scalar @bin2 == 2) { > + return; > } This is actually quite a good way to probably check for the expected result. > > if ($bin1[0] eq $bin2[0] && $bin1[1] eq $bin2[1]) { -Michael