From 6a674af346607cee9c2d371189c04e19c402adf0 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Mon, 2 May 2016 01:36:02 +0200 Subject: sboremove: rewrite confirm_remove() to use in() --- sboremove | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sboremove b/sboremove index 9622bca..c04f1c8 100755 --- a/sboremove +++ b/sboremove @@ -110,11 +110,7 @@ sub get_required_by { sub confirm_remove { my $sbo = shift; - my $found = 0; - for my $conf (@confirmed) { - $found++ if $sbo eq $conf; - } - push @confirmed, $sbo unless $found; + push @confirmed, $sbo unless in($sbo => @confirmed); return 1; } -- cgit v1.2.3